From a519c3fb255dba32dde520de096aa2196ec36bed Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 10 Jul 2015 11:16:12 -0700 Subject: [PATCH] server_status: show scheduler as a daemon, and check stop_sched and stop_upload From tmannerm on github --- html/user/server_status.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/html/user/server_status.php b/html/user/server_status.php index 083c9400b4..f8542671de 100644 --- a/html/user/server_status.php +++ b/html/user/server_status.php @@ -281,6 +281,11 @@ function get_daemon_status() { } else { $web_host = $main_host; } + if ($config->sched_host) { + $sched_host = trim((string) $config->sched_host); + } else { + $sched_host = $main_host; + } $have_remote = false; $local_daemons = array(); $disabled_daemons = array(); @@ -306,7 +311,19 @@ function get_daemon_status() { $y = new StdClass; $y->cmd = "Upload server"; $y->host = $h; - $y->status = 1; + $y->status = !file_exists("../../stop_upload");; + $local_daemons[] = $y; + } else { + $have_remote = true; + } + + // Scheduler is a daemon too + // + if ($sched_host == $main_host) { + $y = new StdClass; + $y->cmd = "Scheduler"; + $y->host = $sched_host; + $y->status = !file_exists("../../stop_sched");; $local_daemons[] = $y; } else { $have_remote = true;