Fixed running under inetd detection
authorJamie Cameron <jcameron@webmin.com>
Sun, 3 Jun 2007 22:32:35 +0000 (22:32 +0000)
committerJamie Cameron <jcameron@webmin.com>
Sun, 3 Jun 2007 22:32:35 +0000 (22:32 +0000)
proftpd/index.cgi
proftpd/proftpd-lib.pl

index 7229098..ade10e4 100755 (executable)
@@ -223,9 +223,6 @@ print "</form>\n";
 if (!$inet) {
        # Get the FTP server pid
        $pid = &get_proftpd_pid();
-       }
-
-if (!$inet) {
        print "<hr>\n";
        print &ui_buttons_start();
        }
index 774a52d..f666208 100644 (file)
@@ -738,6 +738,11 @@ return $url;
 # Returns the inetd/xinetd object and program if ProFTPd is running under one
 sub running_under_inetd
 {
+# Never under inetd if not set so in config
+local $conf = &get_config();
+local $st = &find_directive("ServerType", $conf);
+return ( ) if (lc($st) eq "inetd");
+
 local ($inet, $inet_mod);
 if (&foreign_check('inetd')) {
         # Check if proftpd is in inetd