server status page: show remote scheduler correctly

The scheduler is a CGI program, not a daemon; it doesn't have a PID file.
So the only way we can see if it's 'running'
is to check the 'stop_sched' trigger file.
Do this whether the scheduler is local or remote.
This commit is contained in:
David Anderson 2024-08-01 17:44:36 -07:00 committed by Vitalii Koshura
parent 3026e527b0
commit 312b0b7e76
No known key found for this signature in database
GPG Key ID: CE0DB1726070A5A3
1 changed files with 7 additions and 11 deletions

View File

@ -356,17 +356,13 @@ function get_daemon_status() {
$have_remote = true;
}
// Scheduler is a daemon too
//
if ($sched_host == $main_host) {
// the scheduler is a CGI program, not a daemon;
// it doesn't have a PID.
$y = new StdClass;
$y->cmd = "Scheduler";
$y->host = $sched_host;
$y->status = !file_exists("../../stop_sched");;
$local_daemons[] = $y;
} else {
$have_remote = true;
}
foreach ($daemons->daemon as $d) {
if ((int)$d->disabled != 0) {