mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Merge pull request #593 from pi-hole/fix/non-local-FTL
Explicitly allow non-local FTL installations
This commit is contained in:
@@ -6,10 +6,19 @@
|
||||
* This file is copyright under the latest version of the EUPL.
|
||||
* Please see LICENSE file for your rights under this license. */
|
||||
|
||||
function testFTL()
|
||||
function testFTL($address)
|
||||
{
|
||||
$ret = shell_exec("pidof pihole-FTL");
|
||||
return intval($ret);
|
||||
if($address === "127.0.0.1")
|
||||
{
|
||||
$ret = shell_exec("pidof pihole-FTL");
|
||||
return intval($ret);
|
||||
}
|
||||
// We cannot relly test for a distant FTL instance
|
||||
// in the same way, so for any other IP address
|
||||
// we simply return true here and rely on the API
|
||||
// socket connection itself to fail if there is nothing
|
||||
// on that address
|
||||
return true;
|
||||
}
|
||||
|
||||
function connectFTL($address, $port=4711, $quiet=true)
|
||||
|
||||
Reference in New Issue
Block a user