server_status: show scheduler as a daemon, and check stop_sched and stop_upload

From tmannerm on github
This commit is contained in:
David Anderson 2015-07-10 11:16:12 -07:00
parent efb2db8fc0
commit a519c3fb25
1 changed files with 18 additions and 1 deletions

View File

@ -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;