diff options
author | Warren Baker <warren@decoy.co.za> | 2011-10-01 20:26:09 +0200 |
---|---|---|
committer | Warren Baker <warren@decoy.co.za> | 2011-10-01 20:26:09 +0200 |
commit | 1485c2da4f2c94e87347ff0f1479ddd0d5d15e3f (patch) | |
tree | ba6caa9efbe001a20edcdee8893d811606eb18df /etc/inc/unbound.inc | |
parent | 291492467fad88158d0b092e7b40ac71ac4fa29b (diff) | |
download | pfsense-1485c2da4f2c94e87347ff0f1479ddd0d5d15e3f.zip pfsense-1485c2da4f2c94e87347ff0f1479ddd0d5d15e3f.tar.gz |
Add include fore remote control and change files .conf extension
Diffstat (limited to 'etc/inc/unbound.inc')
-rw-r--r-- | etc/inc/unbound.inc | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/etc/inc/unbound.inc b/etc/inc/unbound.inc index a960ff7..3b7f839 100644 --- a/etc/inc/unbound.inc +++ b/etc/inc/unbound.inc @@ -287,11 +287,22 @@ interface: ::0 {$private_domains} # Static host entries -include: {$g['unbound_chroot_path']}/etc/host_entries +include: {$g['unbound_chroot_path']}/etc/host_entries.conf ### # Remote Control Config ### +include: {$g['unbound_chroot_path']}/etc/remotecontrol.conf + +EOD; + +} + +function unbound_remote_control_setup() { + global $config, $g; + + if(!file_exists("{$g['unbound_chroot_path']}/etc/remotecontrol.conf")) { + $remotcfg = <<<EOF remote-control: control-enable: yes control-interface: 127.0.0.1 @@ -300,9 +311,10 @@ server-key-file: "/etc/unbound_server.key" server-cert-file: "/etc/unbound_server.pem" control-key-file: "/etc/unbound_control.key" control-cert-file: "/etc/unbound_control.pem" -EOD; - +EOF; + file_put_contents("{$g['unbound_chroot_path']}/etc/remotecontrol.conf", $remotcfg); + } } function unbound_add_host_entries() { @@ -399,7 +411,7 @@ function unbound_add_host_entries() { } /* Write out entries */ - file_put_contents("{$g['unbound_chroot_path']}/etc/host_entries", $unbound_entries); + file_put_contents("{$g['unbound_chroot_path']}/etc/host_entries.conf", $unbound_entries); } ?>
\ No newline at end of file |