mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-22 07:30:23 +00:00
Merge pull request #1427 from RaspAP/fix/log-dhcp-checkboxes
Fix: log DHCP requests + DNS queries checkbox states
This commit is contained in:
commit
9dcdd2ca7a
1 changed files with 5 additions and 0 deletions
|
@ -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…
Reference in a new issue