diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-12-24 12:09:34 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-12-24 12:09:34 -0200 |
commit | 72a95734e3430616a2bf389126032eb67a1d9a87 (patch) | |
tree | 6907076724d839f2f790d8f4889b78c26cb6f61d | |
parent | 67e861292a48f6d94f8136699f8b74f21429af32 (diff) | |
download | pfsense-72a95734e3430616a2bf389126032eb67a1d9a87.zip pfsense-72a95734e3430616a2bf389126032eb67a1d9a87.tar.gz |
When WANTIME is empty, there is nothing to do here
-rwxr-xr-x | usr/local/bin/ping_hosts.sh | 2 |
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 |