2 # Monitor the ProFTPD server on this host
4 # Check the PID file to see if proftpd is running
7 return { 'up' => -1 } if (!&foreign_check($_[1]));
8 local %pconfig = &foreign_config($_[1]);
9 -r $pconfig{'proftpd_path'} || return { 'up' => -1 };
10 &foreign_require($_[1], "proftpd-lib.pl");
11 local $r = &foreign_call($_[1], "is_proftpd_running");
13 return { 'up' => -1 };
23 sub parse_proftpd_dialog
25 &error($text{'proftpd_etype'}) if (&run_from_inetd());
30 local $m = $_[0]->{'clone'} || "proftpd";
31 &foreign_require($m, "proftpd-lib.pl");
32 local $conf = &foreign_call($m, "get_config");
33 local $st = &foreign_call($m, "find_directive", "ServerType", $conf);
34 return lc($st) eq 'inetd';