summaryrefslogtreecommitdiffstats
path: root/usr/local/bin
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-12-24 12:09:34 -0200
committerRenato Botelho <garga@FreeBSD.org>2013-12-24 12:16:56 -0200
commite2edc30daa39e1e71015ce49e26b4374a960ad04 (patch)
treeea1ea31b2e1e50fbb85260c125e6bd1a227365c2 /usr/local/bin
parent811ecea47ee06232423aa8ec393423905e209769 (diff)
downloadpfsense-e2edc30daa39e1e71015ce49e26b4374a960ad04.zip
pfsense-e2edc30daa39e1e71015ce49e26b4374a960ad04.tar.gz
When WANTIME is empty, there is nothing to do here
Diffstat (limited to 'usr/local/bin')
-rwxr-xr-xusr/local/bin/ping_hosts.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/local/bin/ping_hosts.sh b/usr/local/bin/ping_hosts.sh
index 3858733..30782b8 100755
--- a/usr/local/bin/ping_hosts.sh
+++ b/usr/local/bin/ping_hosts.sh
@@ -120,7 +120,7 @@ for TOPING in $PINGHOSTS ; do
#WANTIME=`rrdtool fetch /var/db/rrd/wan-quality.rrd AVERAGE -r 120 -s -1min -e -1min | grep ":" | cut -f3 -d" " | cut -d"e" -f1`
echo "Checking wan ping time $WANTIME"
echo $WANTIME > /var/db/wanaverage
- if [ "$WANTHRESHOLD" != "" ]; then
+ if [ "$WANTHRESHOLD" != "" -a "$WANTIME" != "" ]; then
if [ $(echo "${WANTIME} > ${WANTHRESHOLD}" | /usr/bin/bc) -eq 1 ]; then
echo "$DSTIP has exceeded wan ping threshold $WANTIME / $WANTHRESHOLD .. Running $FAILURESCRIPT"
echo "$DSTIP has exceeded wan ping threshold $WANTIME / $WANTHRESHOLD .. Running $FAILURESCRIPT" | logger -p daemon.info -i -t PingMonitor
OpenPOWER on IntegriCloud