diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-12-24 12:07:24 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-12-24 12:07:24 -0200 |
commit | 128cc1f419818dc296fb6b8726982840b2aacbb5 (patch) | |
tree | 380ccae5b915a90a682b19c3643d21431decd1c8 | |
parent | cd14bb1950262bb6447fc47db5bee494d6ce5f45 (diff) | |
download | pfsense-128cc1f419818dc296fb6b8726982840b2aacbb5.zip pfsense-128cc1f419818dc296fb6b8726982840b2aacbb5.tar.gz |
Save status even if no script is executed
-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 c8538a6..5e2f1c7 100755 --- a/usr/local/bin/ping_hosts.sh +++ b/usr/local/bin/ping_hosts.sh @@ -88,9 +88,9 @@ 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 + echo "UP" > /var/db/pingstatus/$DSTIP fi else # Host is down @@ -99,9 +99,9 @@ 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 + echo "DOWN" > /var/db/pingstatus/$DSTIP fi fi echo "Checking ping time $DSTIP" |