mirror of
https://github.com/unraid/webgui.git
synced 2026-04-26 12:20:42 -05:00
Reduce monitor_nchan messages
This commit is contained in:
@@ -755,7 +755,7 @@ foreach ($pages as $page) {
|
||||
if ($close) echo "</div></div>";
|
||||
}
|
||||
if (count($pages)) {
|
||||
$running = file_exists($nchan_pid) ? file($nchan_pid,FILE_IGNORE_NEW_LINES) : [];
|
||||
$running = file_exists($nchan_pid) ? file($nchan_pid,FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES) : [];
|
||||
$start = array_diff($nchan, $running); // returns any new scripts to be started
|
||||
$stop = array_diff($running, $nchan); // returns any old scripts to be stopped
|
||||
$running = array_merge($start, $running); // update list of current running nchan scripts
|
||||
@@ -768,7 +768,7 @@ if (count($pages)) {
|
||||
foreach ($stop as $row) {
|
||||
[$script,$opt] = my_explode(':',$row);
|
||||
if ($opt == 'stop') {
|
||||
exec("pkill -f $docroot/$script >/dev/null &");
|
||||
exec("pkill -f $docroot/$script &>/dev/null &");
|
||||
array_splice($running,array_search($row,$running),1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user