mirror of
https://github.com/pi-hole/web.git
synced 2026-04-28 12:44:07 +01:00
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:
@@ -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)
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user