From 4f96cab409be7f86e02a3effe99cb95d10445c12 Mon Sep 17 00:00:00 2001 From: Logan Lipke Date: Thu, 18 Jun 2020 16:57:47 -0700 Subject: [PATCH] Extended ping deadline, changed file finding method --- updateTest.bash | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/updateTest.bash b/updateTest.bash index 979f8d11..926ce125 100755 --- a/updateTest.bash +++ b/updateTest.bash @@ -11,12 +11,12 @@ CTLH="/home/lanforge/Documents/connectTestHLog.txt" verNum="5.4.2" GUIDIR="${HL}/LANforgeGUI_${verNum}" ST="/tmp/summary.txt" -IP="jed-centos7" +IP="192.168.95.239" -find "${GUIDIR}/down-check" -mmin 60 | grep "down-check" -if [[ 0 == $? ]]; then - ping -c2 -i1 -nq -w1 -W2 ${IP} - if [[ 0 != $? ]]; then +numFound=$()find "${GUIDIR} -iname down-check" -mmin 60 | grep "down-check") +if [[ $numFound == 1 ]]; then + ping -c2 -i1 -nq -w2 -W2 ${IP} + if [[ 1 != $? ]]; then touch "${GUIDIR}/down-check" echo "Could not connect to ${IP}" exit 1 @@ -24,14 +24,15 @@ if [[ 0 == $? ]]; then rm "${GUIDIR}/down-check" fi else - ping -c2 -i1 -nq -w1 -W2 ${IP} - if [[ 0 != $? ]]; then + ping -c2 -i1 -nq -w2 -W2 ${IP} + if [[ 1 != $? ]]; then touch "${GUIDIR}/down-check" echo "Could not connect to ${IP}" exit 1 fi fi + rm -f /tmp/*.txt rm -f $GUILog $GUIUpdate $CTLGUI $CTLH $ST