ctucx.git: dnsmasq-lease-overview

web-overview for dhcp-leases from dnsmasq

commit 84c47b17361fd3273f5d7902a407d467ae937cfd
parent bfecd0b4ee84fee37cc4e8cbfdc87e4f9bf557d5
Author: Leah (ctucx) <leah@ctu.cx>
Date: Sat, 22 Jan 2022 22:43:43 +0100

change path to leases file
1 file changed, 2 insertions(+), 2 deletions(-)
M
index.php
|
4
++--
diff --git a/index.php b/index.php
@@ -16,7 +16,7 @@ Router::add('GET', '/', function() {
 Router::add('GET', '/overview', function() {
 	global $tpl;
 	
-	$leases = parseDhcpLeases('/var/lib/misc/dnsmasq.leases');
+	$leases = parseDhcpLeases('/var/lib/dnsmasq/dnsmasq.leases');
 
 	foreach ($leases['ipv4'] as $lease4) {
 		$lease6 = NULL;

@@ -71,7 +71,7 @@ Router::add('GET', '/overview', function() {
 
 Router::add('GET', '/overview/json', function() {
 	header('Content-Type: application/json');	
-	echo json_encode(parseDhcpLeases('/var/lib/misc/dnsmasq.leases'));
+	echo json_encode(parseDhcpLeases('/var/lib/dnsmasq/dnsmasq.leases'));
 });
 
 Router::pathNotFound(function() {