diff options
author | Jim P <jim@pingle.org> | 2012-03-15 06:19:24 -0700 |
---|---|---|
committer | Jim P <jim@pingle.org> | 2012-03-15 06:19:24 -0700 |
commit | 30a560cfca96f6b6f6ac90510d2e371a64ec50af (patch) | |
tree | fdb36263d47c7e49704286044ab7103d9e6f939e /usr | |
parent | 7a7638986004929feddc8a84665b10fb9057ff97 (diff) | |
parent | fad0e014a7d490321401c31011744987f973267e (diff) | |
download | pfsense-30a560cfca96f6b6f6ac90510d2e371a64ec50af.zip pfsense-30a560cfca96f6b6f6ac90510d2e371a64ec50af.tar.gz |
Merge pull request #53 from jeandebogue/patch-1
Move the echo "UP|DOWN" earlier
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/bin/ping_hosts.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/local/bin/ping_hosts.sh b/usr/local/bin/ping_hosts.sh index c0de5a1..949a843 100755 --- a/usr/local/bin/ping_hosts.sh +++ b/usr/local/bin/ping_hosts.sh @@ -85,10 +85,10 @@ for TOPING in $PINGHOSTS ; do if [ "$SERVICERESTOREDSCRIPT" != "" ]; then echo "$DSTIP is UP, previous state was DOWN .. Running $SERVICERESTOREDSCRIPT" echo "$DSTIP is UP, previous state was DOWN .. Running $SERVICERESTOREDSCRIPT" | logger -p daemon.info -i -t PingMonitor + echo "UP" > /var/db/pingstatus/$DSTIP sh -c $SERVICERESTOREDSCRIPT fi fi - echo "UP" > /var/db/pingstatus/$DSTIP else # Host is down PREVIOUSSTATUS=`cat /var/db/pingstatus/$DSTIP` @@ -97,10 +97,10 @@ for TOPING in $PINGHOSTS ; do if [ "$FAILURESCRIPT" != "" ]; then echo "$DSTIP is DOWN, previous state was UP .. Running $FAILURESCRIPT" echo "$DSTIP is DOWN, previous state was UP .. Running $FAILURESCRIPT" | logger -p daemon.info -i -t PingMonitor + echo "DOWN" > /var/db/pingstatus/$DSTIP sh -c $FAILURESCRIPT fi fi - echo "DOWN" > /var/db/pingstatus/$DSTIP fi echo "Checking ping time $DSTIP" # Look at ping values themselves |