mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 16:50:24 +00:00
Gracefully handle monitor types that don't exist
https://forum.virtualmin.com/t/finally-upgraded-and-a-problem/135204
This commit is contained in:
@@ -197,9 +197,14 @@ foreach $r (&expand_remotes($serv)) {
|
||||
# Just include and use the local monitor library
|
||||
do "${t}-monitor.pl" if (!$done_monitor{$t}++);
|
||||
my $func = "get_${t}_status";
|
||||
$rv = &$func($serv,
|
||||
if (defined(&$func)) {
|
||||
$rv = &$func($serv,
|
||||
$serv->{'clone'} ? $serv->{'clone'} : $t,
|
||||
$fromcgi);
|
||||
}
|
||||
else {
|
||||
$rv = { 'up' => -1 };
|
||||
}
|
||||
}
|
||||
alarm(0);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user