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

@@ -8,7 +8,8 @@
function testFTL()
{
return (strpos(exec("ps -p `cat /var/run/pihole-FTL.pid` -o comm="), "pihole-FTL") !== false);
$ret = shell_exec("pidof pihole-FTL");
return intval($ret);
}
function connectFTL($address, $port=4711, $quiet=true)