summaryrefslogtreecommitdiffstats
path: root/etc/inc/unbound.inc
diff options
context:
space:
mode:
authorWarren Baker <warren@decoy.co.za>2011-10-01 20:26:09 +0200
committerWarren Baker <warren@decoy.co.za>2011-10-01 20:26:09 +0200
commit1485c2da4f2c94e87347ff0f1479ddd0d5d15e3f (patch)
treeba6caa9efbe001a20edcdee8893d811606eb18df /etc/inc/unbound.inc
parent291492467fad88158d0b092e7b40ac71ac4fa29b (diff)
downloadpfsense-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.inc20
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
OpenPOWER on IntegriCloud