aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-04-29 12:22:56 -0300
committerRenato Botelho <garga@FreeBSD.org>2013-04-29 12:22:56 -0300
commite1e0c57d2f412ead688276b5ec697423e6d49273 (patch)
tree5833e8e253af4f6b0feea67d535947f66d4c7e2f
parent90c7a7d4d71ac3470b93977c00b6cfa0a4fae7c1 (diff)
downloadpfsense-packages-e1e0c57d2f412ead688276b5ec697423e6d49273.tar.gz
pfsense-packages-e1e0c57d2f412ead688276b5ec697423e6d49273.tar.bz2
pfsense-packages-e1e0c57d2f412ead688276b5ec697423e6d49273.zip
Start/Stop unbound_monitor when unbound is started/stopped
-rw-r--r--config/unbound/unbound.inc3
1 files changed, 3 insertions, 0 deletions
diff --git a/config/unbound/unbound.inc b/config/unbound/unbound.inc
index ec08cba9..3287b194 100644
--- a/config/unbound/unbound.inc
+++ b/config/unbound/unbound.inc
@@ -205,6 +205,7 @@ function unbound_control($action) {
@unlink("/var/run/dnsmasq.pid");
mwexec("/bin/ln -s /var/run/unbound.pid /var/run/dnsmasq.pid");
}
+ mwexec_bg("/usr/local/etc/rc.d/unbound_monitor.sh start");
fetch_root_hints();
}
break;
@@ -212,12 +213,14 @@ function unbound_control($action) {
case "stop":
//Stop unbound and unmount the file system
if($unbound_config['unbound_status'] == "on") {
+ mwexec_bg("/usr/local/etc/rc.d/unbound_monitor.sh stop");
unbound_ctl_exec("stop");
}
break;
case "termstop":
//Stop Unbound by sigkillbypid();
+ mwexec_bg("/usr/local/etc/rc.d/unbound_monitor.sh stop");
sigkillbypid("{$g['varrun_path']}/unbound.pid", "TERM");
break;