summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2013-03-20 15:14:24 -0700
committerErmal Luçi <eri@pfsense.org>2013-03-20 15:14:24 -0700
commit8f38fd8de9d0d3d9d662fa3896490bbec04fe4bd (patch)
tree6689f225a59b35ae7652bfaefd2798eb08ab9fd1
parent076150450465b13c32e4cb8e1a5a6eb227997f16 (diff)
parent3e3ff9317209be31128f19116cab97de2680c823 (diff)
downloadpfsense-8f38fd8de9d0d3d9d662fa3896490bbec04fe4bd.zip
pfsense-8f38fd8de9d0d3d9d662fa3896490bbec04fe4bd.tar.gz
Merge pull request #487 from rdlugosz/change_apinger_status_path
Track apinger status in /var/run instead of /tmp
-rw-r--r--etc/inc/gwlb.inc10
1 files changed, 5 insertions, 5 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc
index ce4c317..13cde22 100644
--- a/etc/inc/gwlb.inc
+++ b/etc/inc/gwlb.inc
@@ -53,7 +53,7 @@ function setup_gateways_monitor() {
if (!is_array($gateways_arr)) {
log_error("No gateways to monitor. Apinger will not be run.");
killbypid("{$g['varrun_path']}/apinger.pid");
- @unlink("{$g['tmp_path']}/apinger.status");
+ @unlink("{$g['varrun_path']}/apinger.status");
return;
}
@@ -78,7 +78,7 @@ pid_file "{$g['varrun_path']}/apinger.pid"
status {
## File where the status information should be written to
- file "{$g['tmp_path']}/apinger.status"
+ file "{$g['varrun_path']}/apinger.status"
## Interval between file updates
## when 0 or not set, file is written only when SIGUSR1 is received
interval 5s
@@ -267,7 +267,7 @@ EOD;
@chown("{$g['vardb_path']}/rrd", "nobody");
/* start a new apinger process */
- @unlink("{$g['tmp_path']}/apinger.status");
+ @unlink("{$g['varrun_path']}/apinger.status");
sleep(1);
mwexec_bg("/usr/local/sbin/apinger -c {$g['varetc_path']}/apinger.conf");
@@ -279,8 +279,8 @@ function return_gateways_status($byname = false) {
global $config, $g;
$apingerstatus = array();
- if (file_exists("{$g['tmp_path']}/apinger.status")) {
- $apingerstatus = file("{$g['tmp_path']}/apinger.status");
+ if (file_exists("{$g['varrun_path']}/apinger.status")) {
+ $apingerstatus = file("{$g['varrun_path']}/apinger.status");
}
$status = array();
OpenPOWER on IntegriCloud