diff options
author | Ermal <eri@pfsense.org> | 2013-08-13 20:09:44 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-08-13 20:09:44 +0000 |
commit | 2db93ddbf5c2341f5d76afad892cac4ea5acfee5 (patch) | |
tree | a3946251640ab5a1c358a75f1931029351bb7729 /etc/inc/gwlb.inc | |
parent | 1016c546b6d5944b417e1f1f191bab71b1e1ad8c (diff) | |
download | pfsense-2db93ddbf5c2341f5d76afad892cac4ea5acfee5.zip pfsense-2db93ddbf5c2341f5d76afad892cac4ea5acfee5.tar.gz |
Force apinger to write the status file before getting gateway status
Diffstat (limited to 'etc/inc/gwlb.inc')
-rw-r--r-- | etc/inc/gwlb.inc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index 17a0d20..33ffaf6 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -266,9 +266,13 @@ function return_gateways_status($byname = false) { global $config, $g; $apingerstatus = array(); + /* Always get the latest status from apinger */ + if (file_exists("{$g['varrun_path']}/apinger.pid")) + sigkillbypid("{$g['varrun_path']}/apinger.pid", "USR1"); if (file_exists("{$g['varrun_path']}/apinger.status")) { $apingerstatus = file("{$g['varrun_path']}/apinger.status"); - } + } else + $apingerstatus = array(); $status = array(); foreach($apingerstatus as $line) { |