summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorWarren Baker <warren@decoy.co.za>2014-01-29 13:29:32 +0200
committerWarren Baker <warren@decoy.co.za>2014-01-29 13:29:32 +0200
commit175dc861c2d011f13b055649283403b90086cb35 (patch)
tree2e2376ed44dc7d612a00b37e3fa3c48a8bf995b3 /etc
parent6671b7cde68cc28d64f3eba77122b615ea42e098 (diff)
downloadpfsense-175dc861c2d011f13b055649283403b90086cb35.zip
pfsense-175dc861c2d011f13b055649283403b90086cb35.tar.gz
Add Unbound service configuration
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/services.inc37
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'])) {
OpenPOWER on IntegriCloud