diff --git a/proftpd/index.cgi b/proftpd/index.cgi
index 72290981a..ade10e432 100755
--- a/proftpd/index.cgi
+++ b/proftpd/index.cgi
@@ -223,9 +223,6 @@ print "\n";
if (!$inet) {
# Get the FTP server pid
$pid = &get_proftpd_pid();
- }
-
-if (!$inet) {
print "
\n";
print &ui_buttons_start();
}
diff --git a/proftpd/proftpd-lib.pl b/proftpd/proftpd-lib.pl
index 774a52d79..f66620811 100644
--- a/proftpd/proftpd-lib.pl
+++ b/proftpd/proftpd-lib.pl
@@ -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