aboutsummaryrefslogtreecommitdiffstats
path: root/config/unbound/unbound.inc
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-04-30 18:29:19 -0300
committerRenato Botelho <garga@FreeBSD.org>2013-04-30 18:29:19 -0300
commit8596af32d3bf099dce8df344c90b8a525598f00f (patch)
tree63bc740009c1ea228dd1cc4649fd04fc00d549c6 /config/unbound/unbound.inc
parent20765c96dc454d40d452fd4dbeb91c2ec5c53d12 (diff)
downloadpfsense-packages-8596af32d3bf099dce8df344c90b8a525598f00f.tar.gz
pfsense-packages-8596af32d3bf099dce8df344c90b8a525598f00f.tar.bz2
pfsense-packages-8596af32d3bf099dce8df344c90b8a525598f00f.zip
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
Diffstat (limited to 'config/unbound/unbound.inc')
-rw-r--r--config/unbound/unbound.inc7
1 files changed, 4 insertions, 3 deletions
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;