From 8596af32d3bf099dce8df344c90b8a525598f00f Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Tue, 30 Apr 2013 18:29:19 -0300 Subject: Fix unbound_monitor.sh (Ticket #2817) . Use a PID file to keep track if it's running or not . Move it to /usr/local/bin, it doesn't need to be started by rc.start_packages since it's already called by unbound.inc . Define PATH and remove complete path for all binaries . Remove unbound initscript symlink created when it's installed by a PBI package . Bump unbound to 1.4.20_5 --- config/unbound/unbound.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'config/unbound/unbound.inc') diff --git a/config/unbound/unbound.inc b/config/unbound/unbound.inc index 3287b194..c5cbfc49 100644 --- a/config/unbound/unbound.inc +++ b/config/unbound/unbound.inc @@ -70,6 +70,7 @@ function unbound_initial_setup() { // We do not need the sample conf or the default rc.d startup file @unlink_if_exists(UNBOUND_BASE . "/etc/unbound/unbound.conf.sample"); @unlink_if_exists(UNBOUND_BASE . "/etc/rc.d/unbound"); + @unlink_if_exists("/usr/local/etc/rc.d/unbound"); // Setup rc file for startup and shutdown. unbound_rc_setup(); @@ -205,7 +206,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"); + mwexec_bg("/usr/local/bin/unbound_monitor.sh"); fetch_root_hints(); } break; @@ -213,14 +214,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"); + mwexec_bg("/usr/local/bin/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"); + mwexec_bg("/usr/local/bin/unbound_monitor.sh stop"); sigkillbypid("{$g['varrun_path']}/unbound.pid", "TERM"); break; -- cgit v1.2.3