From e1e0c57d2f412ead688276b5ec697423e6d49273 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Mon, 29 Apr 2013 12:22:56 -0300 Subject: Start/Stop unbound_monitor when unbound is started/stopped --- config/unbound/unbound.inc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'config') 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; -- cgit v1.2.3