Commit c86e7e06 authored by Ad Schellevis's avatar Ad Schellevis

unbound, change order of things

parent 3d78e71c
......@@ -239,6 +239,14 @@ EOF;
$rrsetcachesize = $msgcachesize * 2;
$dnssecstripped = !empty($config['unbound']['dnssecstripped']) ? "yes" : "no";
if (isset($config['unbound']['regdhcp'])) {
// include dynamic leases
@touch("{$g['unbound_chroot_path']}/dhcpleases.conf");
$include_dhcpleases = "include: {$g['unbound_chroot_path']}/dhcpleases.conf";
} else {
$include_dhcpleases = "";
}
// Set up forwarding if it configured
if (isset($config['unbound']['forwarding'])) {
$dnsservers = array();
......@@ -337,6 +345,9 @@ include: {$g['unbound_chroot_path']}/access_lists.conf
# Static host entries
include: {$g['unbound_chroot_path']}/host_entries.conf
# DHCP leases (if configured)
{$include_dhcpleases}
# Domain overrides
include: {$g['unbound_chroot_path']}/domainoverrides.conf
......@@ -351,11 +362,6 @@ include: {$g['unbound_chroot_path']}/remotecontrol.conf
EOD;
if (isset($config['unbound']['regdhcp'])) {
// include dynamic leases
@touch("{$g['unbound_chroot_path']}/dhcpleases.conf");
$unboundconf .= "\ninclude: {$g['unbound_chroot_path']}/dhcpleases.conf\n";
}
file_put_contents("{$g['unbound_chroot_path']}/unbound.conf", $unboundconf);
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment