Specify one common place for defining the IP of a non-local FTL instance. Fixes #589

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2017-10-02 12:17:21 +02:00
parent 2b5e89be35
commit fcf2eb663f
3 changed files with 16 additions and 5 deletions

View File

@@ -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);
}
else
{
// We cannot relly test for a distant FTL instance
// in the same way, so we return true here
return true;
}
}
function connectFTL($address, $port=4711, $quiet=true)