Define RASPI_DHCPCD_LOG

This commit is contained in:
billz
2021-11-17 18:20:03 +00:00
parent 8cef08cc81
commit e75333e29d
5 changed files with 6 additions and 4 deletions

View File

@@ -78,7 +78,7 @@ function DisplayAdBlockConfig()
$adblock_custom_content = file_get_contents(RASPI_ADBLOCK_LISTPATH .'custom.txt');
$adblock_log = '';
exec('sudo chmod o+r /tmp/dnsmasq.log');
exec('sudo chmod o+r '.RASPI_DHCPCD_LOG);
$handle = fopen("/tmp/dnsmasq.log", "r");
if ($handle) {
while (($line = fgets($handle)) !== false) {

View File

@@ -20,6 +20,7 @@ $defaults = [
'RASPI_ADBLOCK_CONFIG' => RASPI_DNSMASQ_PREFIX.'adblock.conf',
'RASPI_HOSTAPD_CONFIG' => '/etc/hostapd/hostapd.conf',
'RASPI_DHCPCD_CONFIG' => '/etc/dhcpcd.conf',
'RASPI_DHCPCD_LOG' => '/var/log/dnsmasq.log',
'RASPI_WPA_SUPPLICANT_CONFIG' => '/etc/wpa_supplicant/wpa_supplicant.conf',
'RASPI_HOSTAPD_CTRL_INTERFACE' => '/var/run/hostapd',
'RASPI_WPA_CTRL_INTERFACE' => '/var/run/wpa_supplicant',

View File

@@ -228,7 +228,7 @@ function updateDnsmasqConfig($iface,$status)
// write default 090_raspap.conf
$config = '# RaspAP default config'.PHP_EOL;
$config .='log-facility=/tmp/dnsmasq.log'.PHP_EOL;
$config .='log-facility='.RASPI_DHCPCD_LOG.PHP_EOL;
$config .='conf-dir=/etc/dnsmasq.d'.PHP_EOL;
// handle log option
if ($_POST['log-dhcp'] == "1") {