Handle hostnames with upper-case letters
[webmin.git] / status / mon-monitor.pl
1 # mon-monitor.pl
2 # Monitor the mon daemon on this host
3
4 # Check the PID file to see if mon is running
5 sub get_mon_status
6 {
7 local %mconfig = &foreign_config($_[1]);
8 -d $mconfig{'cfbasedir'} || return { 'up' => -1 };
9 local $pid;
10 if (open(PID, $mconfig{'pid_file'}) && chop($pid = <PID>) && kill(0, $pid)) {
11         return { 'up' => 1 };
12         }
13 else {
14         return { 'up' => 0 };
15         }
16 }
17
18 sub parse_mon_dialog
19 {
20 &depends_check($_[0], "mon");
21 }
22
23 1;
24