From aff70640bfe35f14176b6134359f05d565c83511 Mon Sep 17 00:00:00 2001 From: Seth Mos Date: Wed, 16 Mar 2011 13:28:39 +0100 Subject: Swap if statement, add fields into ipsecpinghosts file --- usr/local/bin/ping_hosts.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr/local/bin/ping_hosts.sh') diff --git a/usr/local/bin/ping_hosts.sh b/usr/local/bin/ping_hosts.sh index 19a6161..c0de5a1 100755 --- a/usr/local/bin/ping_hosts.sh +++ b/usr/local/bin/ping_hosts.sh @@ -68,10 +68,10 @@ for TOPING in $PINGHOSTS ; do THRESHOLD=`echo $TOPING | cut -d"|" -f6` WANTHRESHOLD=`echo $TOPING | cut -d"|" -f7` AF=`echo $TOPING | cut -d"|" -f8` - if [ "$AF" == "inet" ]; then - PINGCMD=ping - else + if [ "$AF" == "inet6" ]; then PINGCMD=ping6 + else + PINGCMD=ping fi echo Processing $DSTIP # Look for a service being down -- cgit v1.1