mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
add conf-dir option to dnsmasq.conf, closes #403
this allows custom configuration stored in files in /etc/dnsmasq.d. raspap does not touch them and they'll always be loaded. also creates /etc/dnsmasq.d if it doesn't exist.
This commit is contained in:
parent
d748a341bd
commit
409adb0c05
@ -67,6 +67,8 @@ function DisplayDHCPConfig()
|
|||||||
$config .= PHP_EOL;
|
$config .= PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$config .= "conf-dir=/etc/dnsmasq.d".PHP_EOL;
|
||||||
|
|
||||||
file_put_contents("/tmp/dnsmasqdata", $config);
|
file_put_contents("/tmp/dnsmasqdata", $config);
|
||||||
system('sudo cp /tmp/dnsmasqdata '.RASPI_DNSMASQ_CONFIG, $return);
|
system('sudo cp /tmp/dnsmasqdata '.RASPI_DNSMASQ_CONFIG, $return);
|
||||||
} else {
|
} else {
|
||||||
|
@ -233,6 +233,8 @@ function default_configuration() {
|
|||||||
sudo cp $webroot_dir/config/dnsmasq.conf /etc/dnsmasq.conf || install_error "Unable to move dnsmasq configuration file"
|
sudo cp $webroot_dir/config/dnsmasq.conf /etc/dnsmasq.conf || install_error "Unable to move dnsmasq configuration file"
|
||||||
sudo cp $webroot_dir/config/dhcpcd.conf /etc/dhcpcd.conf || install_error "Unable to move dhcpcd configuration file"
|
sudo cp $webroot_dir/config/dhcpcd.conf /etc/dhcpcd.conf || install_error "Unable to move dhcpcd configuration file"
|
||||||
|
|
||||||
|
[ -d /etc/dnsmasq.d ] || sudo mkdir /etc/dnsmasq.d
|
||||||
|
|
||||||
if [ ! -f "$webroot_dir/includes/config.php" ]; then
|
if [ ! -f "$webroot_dir/includes/config.php" ]; then
|
||||||
sudo cp "$webroot_dir/config/config.php" "$webroot_dir/includes/config.php"
|
sudo cp "$webroot_dir/config/config.php" "$webroot_dir/includes/config.php"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user