diff options
author | Warren Baker <warren@decoy.co.za> | 2014-01-29 13:29:32 +0200 |
---|---|---|
committer | Warren Baker <warren@decoy.co.za> | 2014-01-29 13:29:32 +0200 |
commit | 175dc861c2d011f13b055649283403b90086cb35 (patch) | |
tree | 2e2376ed44dc7d612a00b37e3fa3c48a8bf995b3 | |
parent | 6671b7cde68cc28d64f3eba77122b615ea42e098 (diff) | |
download | pfsense-175dc861c2d011f13b055649283403b90086cb35.zip pfsense-175dc861c2d011f13b055649283403b90086cb35.tar.gz |
Add Unbound service configuration
-rw-r--r-- | etc/inc/services.inc | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc index ee8f40f..176d2a6 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -1696,10 +1696,6 @@ function services_dnsmasq_configure() { else sleep(1); - /* generate hosts file */ - if(system_hosts_generate()!=0) - $return = 1; - $args = ""; if (isset($config['dnsmasq']['regdhcp'])) { @@ -1825,6 +1821,39 @@ function services_dnsmasq_configure() { return $return; } +function services_unbound_configure() { + global $config, $g; + $return = 0; + + if (isset($config['system']['developerspew'])) { + $mt = microtime(); + echo "services_unbound_configure() being called $mt\n"; + } + + // kill any running Unbound instance + if (file_exists("{$g['varrun_path']}/unbound.pid")) + sigkillbypid("{$g['varrun_path']}/unbound.pid", "TERM"); + + if (isset($config['unbound']['enable'])) { + if ($g['booting']) + echo gettext("Starting Unbound DNS forwarder..."); + else + sleep(1); + + require_once('/etc/inc/unbound.inc'); + sync_unbound_service(); + if ($g['booting']) + echo gettext("done.") . "\n"; + } + + if (!$g['booting']) { + if (services_dhcpd_configure()!=0) + $return = 1; + } + + return $return; +} + function services_snmpd_configure() { global $config, $g; if(isset($config['system']['developerspew'])) { |