summaryrefslogtreecommitdiffstats
path: root/etc/inc/unbound.inc
diff options
context:
space:
mode:
authorWarren Baker <warren@decoy.co.za>2014-04-28 22:00:25 +0200
committerWarren Baker <warren@decoy.co.za>2014-04-28 22:00:25 +0200
commitf624877441d5c4880d5b0960262a55c69a82e1d2 (patch)
treeab069f1134dc14c187c1be40b773c844696cd6c3 /etc/inc/unbound.inc
parent9a51bb644c19a5bfd76d9d50f2955ea85586315a (diff)
downloadpfsense-f624877441d5c4880d5b0960262a55c69a82e1d2.zip
pfsense-f624877441d5c4880d5b0960262a55c69a82e1d2.tar.gz
If Unbound is been used then make sure to reload when system_hosts_generate() is called
Diffstat (limited to 'etc/inc/unbound.inc')
-rw-r--r--etc/inc/unbound.inc13
1 files changed, 13 insertions, 0 deletions
diff --git a/etc/inc/unbound.inc b/etc/inc/unbound.inc
index c8622d3..aeaf0fc 100644
--- a/etc/inc/unbound.inc
+++ b/etc/inc/unbound.inc
@@ -573,6 +573,10 @@ function unbound_control($action) {
if ($config['unbound']['enable'] == "on")
do_as_unbound_user("stop");
break;
+ case "reload":
+ if ($config['unbound']['enable'] == "on")
+ do_as_unbound_user("reload");
+ break;
case "dump_cache":
// Dump Unbound's Cache
if ($config['unbound']['dumpcache'] == "on")
@@ -657,4 +661,13 @@ function unbound_acls_config() {
}
+// Generate hosts and reload services
+function unbound_hosts_generate() {
+ // Generate our hosts file
+ unbound_add_host_entries();
+
+ // Reload our service to read the updates
+ unbound_control("reload");
+}
+
?> \ No newline at end of file
OpenPOWER on IntegriCloud