mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 19:58:03 +00:00
Extended ping deadline, changed file finding method
This commit is contained in:
@@ -11,12 +11,12 @@ CTLH="/home/lanforge/Documents/connectTestHLog.txt"
|
|||||||
verNum="5.4.2"
|
verNum="5.4.2"
|
||||||
GUIDIR="${HL}/LANforgeGUI_${verNum}"
|
GUIDIR="${HL}/LANforgeGUI_${verNum}"
|
||||||
ST="/tmp/summary.txt"
|
ST="/tmp/summary.txt"
|
||||||
IP="jed-centos7"
|
IP="192.168.95.239"
|
||||||
|
|
||||||
find "${GUIDIR}/down-check" -mmin 60 | grep "down-check"
|
numFound=$()find "${GUIDIR} -iname down-check" -mmin 60 | grep "down-check")
|
||||||
if [[ 0 == $? ]]; then
|
if [[ $numFound == 1 ]]; then
|
||||||
ping -c2 -i1 -nq -w1 -W2 ${IP}
|
ping -c2 -i1 -nq -w2 -W2 ${IP}
|
||||||
if [[ 0 != $? ]]; then
|
if [[ 1 != $? ]]; then
|
||||||
touch "${GUIDIR}/down-check"
|
touch "${GUIDIR}/down-check"
|
||||||
echo "Could not connect to ${IP}"
|
echo "Could not connect to ${IP}"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -24,14 +24,15 @@ if [[ 0 == $? ]]; then
|
|||||||
rm "${GUIDIR}/down-check"
|
rm "${GUIDIR}/down-check"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
ping -c2 -i1 -nq -w1 -W2 ${IP}
|
ping -c2 -i1 -nq -w2 -W2 ${IP}
|
||||||
if [[ 0 != $? ]]; then
|
if [[ 1 != $? ]]; then
|
||||||
touch "${GUIDIR}/down-check"
|
touch "${GUIDIR}/down-check"
|
||||||
echo "Could not connect to ${IP}"
|
echo "Could not connect to ${IP}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
rm -f /tmp/*.txt
|
rm -f /tmp/*.txt
|
||||||
rm -f $GUILog $GUIUpdate $CTLGUI $CTLH $ST
|
rm -f $GUILog $GUIUpdate $CTLGUI $CTLH $ST
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user