Don't rely on PID file, but try to detect FTL PID ourselves (has shown to be very effective in the update service file)

This commit is contained in:
DL6ER
2017-04-20 13:20:36 +02:00
parent c7693fd674
commit b3cbd29ed7
2 changed files with 6 additions and 5 deletions

View File

@@ -146,12 +146,12 @@
}
}
$FTL = false;
$FTLpid = file_get_contents("/var/run/pihole-FTL.pid");
if (file_exists( "/proc/".$FTLpid ))
function pidofFTL()
{
$FTL = true;
return shell_exec("pidof pihole-FTL");
}
$FTLpid = intval(pidofFTL());
$FTL = ($FTLpid !== 0 ? true : false);
?>
<!DOCTYPE html>