Add static host entries to separate file and include in main config

This commit is contained in:
Warren Baker 2011-10-01 20:19:30 +02:00
parent 5b24d6459f
commit 291492467f

View File

@ -286,6 +286,9 @@ interface: ::0
{$private_addr}
{$private_domains}
# Static host entries
include: {$g['unbound_chroot_path']}/etc/host_entries
###
# Remote Control Config
###
@ -303,7 +306,7 @@ EOD;
}
function unbound_add_host_entries() {
global $config;
global $config, $g;
/* XXX: break this out into a separate config file and make use of include */
$syscfg = $config['system'];
@ -394,7 +397,9 @@ function unbound_add_host_entries() {
}
$unbound_entries .= $host_entries;
}
return $unbound_entries;
/* Write out entries */
file_put_contents("{$g['unbound_chroot_path']}/etc/host_entries", $unbound_entries);
}
?>