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:16:45 -0200 |
commit | 8f105c8a9e36c5b84eef754638dd963f50995fec (patch) | |
tree | 04ceeefe009556c5d05bb3ce925cc6fc8de7619d | |
parent | 98864780199e92ab541e69ee3cbce7d9256604df (diff) | |
download | pfsense-8f105c8a9e36c5b84eef754638dd963f50995fec.zip pfsense-8f105c8a9e36c5b84eef754638dd963f50995fec.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" |