summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-06-21 17:58:19 +0000
committerErmal <eri@pfsense.org>2010-06-21 17:58:19 +0000
commit4f0606164f7d257a270070b9de83db8d2e510ca7 (patch)
tree0fa86b63c9f8ceb7b47236153650b5b4f616ab62
parent2d402f570b4925fe8c44218bdf72de1878704d17 (diff)
downloadpfsense-4f0606164f7d257a270070b9de83db8d2e510ca7.zip
pfsense-4f0606164f7d257a270070b9de83db8d2e510ca7.tar.gz
Actually send the HUP signal to tell apinger that a new config file is to be loaded! This should solve a lot of issues with apinger monitoring.
-rw-r--r--etc/inc/gwlb.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc
index 59c42b6..5a328d2 100644
--- a/etc/inc/gwlb.inc
+++ b/etc/inc/gwlb.inc
@@ -238,7 +238,9 @@ EOD;
fwrite($fd, $apingerconfig);
fclose($fd);
- if(!is_process_running("apinger")) {
+ if (is_process_running("apinger")) {
+ sigkillbypid("{$g['varrun_path']}/apinger.pid", "HUP");
+ } else {
if (is_dir("{$g['tmp_path']}"))
chmod("{$g['tmp_path']}", 01777);
if (is_dir("{$g['vardb_path']}/rrd"))
@@ -246,6 +248,7 @@ EOD;
/* start a new apinger process */
mwexec_bg("/usr/local/sbin/apinger -c {$g['varetc_path']}/apinger.conf");
}
+
return 0;
}
OpenPOWER on IntegriCloud