mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
Read/set log-dhcp + log-queries in conf
This commit is contained in:
parent
ee662ada09
commit
dc65af9045
@ -47,6 +47,8 @@ function DisplayDHCPConfig()
|
||||
$ap_iface = $_SESSION['ap_interface'];
|
||||
$serviceStatus = $dnsmasq_state ? "up" : "down";
|
||||
exec('cat '. RASPI_DNSMASQ_PREFIX.'raspap.conf', $return);
|
||||
$log_dhcp = (preg_grep('/log-dhcp/', $return));
|
||||
$log_queries = (preg_grep('/log-queries/', $return));
|
||||
$conf = ParseConfig($return);
|
||||
exec('cat '. RASPI_DNSMASQ_PREFIX.$ap_iface.'.conf', $return);
|
||||
$conf = array_merge(ParseConfig($return));
|
||||
@ -55,6 +57,9 @@ function DisplayDHCPConfig()
|
||||
exec("ip -o link show | awk -F': ' '{print $2}'", $interfaces);
|
||||
exec('cat ' . RASPI_DNSMASQ_LEASES, $leases);
|
||||
|
||||
count($log_dhcp) > 0 ? $conf['log-dhcp'] = true : false ;
|
||||
count($log_queries) > 0 ? $conf['log-queries'] = true : false ;
|
||||
|
||||
echo renderTemplate(
|
||||
"dhcp", compact(
|
||||
"status",
|
||||
|
Loading…
x
Reference in New Issue
Block a user