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