diff options
author | Ermal <eri@pfsense.org> | 2013-03-26 20:33:33 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-03-26 20:33:33 +0000 |
commit | 4d8a1ec23f409a1acbd9c0c8aaf81e75111d7bf0 (patch) | |
tree | d89304c5f572c2856707ba6d1e171be211a8221b | |
parent | a876f1ed0b4f5d876864c57f173f02034b754317 (diff) | |
download | pfsense-4d8a1ec23f409a1acbd9c0c8aaf81e75111d7bf0.zip pfsense-4d8a1ec23f409a1acbd9c0c8aaf81e75111d7bf0.tar.gz |
Move status file to a ram disk to avoid possible latency issues
-rw-r--r-- | etc/inc/gwlb.inc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index 715921d..3f449f5 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -41,7 +41,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; } @@ -72,7 +72,7 @@ pid_file "{$g['varrun_path']}/apinger.pid" status { ## File where the status information whould 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 @@ -235,7 +235,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"); @@ -247,8 +247,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(); |