Handle hostnames with upper-case letters
[webmin.git] / status / hostsentry-monitor.pl
1 # hostsentry-monitor.pl
2 # Monitor the hostsentry daemon
3
4 # Check the PID file to see if hostsentry is running
5 sub get_hostsentry_status
6 {
7 return { 'up' => -1 } if (!&foreign_check("sentry"));
8 local %sconfig = &foreign_config("sentry");
9 -r $sconfig{'hostsentry'} || return { 'up' => -1 };
10 &foreign_require("sentry", "sentry-lib.pl");
11 local $pid = &sentry::get_hostsentry_pid();
12 if ($pid) {
13         return { 'up' => 1 };
14         }
15 else {
16         return { 'up' => 0 };
17         }
18 }
19
20 sub parse_hostsentry_dialog
21 {
22 &depends_check($_[0], "sentry");
23 }
24
25 1;
26