mirror of
https://github.com/pi-hole/web.git
synced 2026-04-23 10:19:47 +01:00
Use API gateway endpoint
Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
@@ -544,4 +544,15 @@ function piholeStatus() {
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
//Returns the default gateway address and interface
|
||||
function getGateway() {
|
||||
$gateway= callFTLAPI("gateway");
|
||||
if (array_key_exists("FTLnotrunning", $gateway)) {
|
||||
$ret = array("ip" => -1);
|
||||
} else {
|
||||
$ret = array_combine(["ip", "iface"], explode(" ", $gateway[0]));
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user