diff options
author | Warren Baker <warren@decoy.co.za> | 2014-04-28 22:00:25 +0200 |
---|---|---|
committer | Warren Baker <warren@decoy.co.za> | 2014-04-28 22:00:25 +0200 |
commit | f624877441d5c4880d5b0960262a55c69a82e1d2 (patch) | |
tree | ab069f1134dc14c187c1be40b773c844696cd6c3 /etc/inc/unbound.inc | |
parent | 9a51bb644c19a5bfd76d9d50f2955ea85586315a (diff) | |
download | pfsense-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.inc | 13 |
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 |