mirror of
https://github.com/unraid/webgui.git
synced 2026-01-05 09:10:07 -06:00
24 lines
734 B
PHP
24 lines
734 B
PHP
<?PHP
|
|
/* Copyright 2005-2023, Lime Technology
|
|
* Copyright 2012-2023, Bergware International.
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License version 2,
|
|
* as published by the Free Software Foundation.
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in
|
|
* all copies or substantial portions of the Software.
|
|
*/
|
|
?>
|
|
<?
|
|
$docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
|
|
$pid = '/var/run/nchan.pid';
|
|
$nchan = 'webGui/nchan/update_3';
|
|
|
|
if (is_file($pid) && exec("grep -Pom1 '^$nchan' $pid")) {
|
|
// restart update_3 script
|
|
exec("pkill -f $nchan");
|
|
exec("$docroot/$nchan &>/dev/null &");
|
|
}
|
|
?>
|