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