mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-10-31 18:58:01 +00:00
Improved ping command
This commit is contained in:
@@ -11,11 +11,11 @@ CTLH="/home/lanforge/Documents/connectTestHLog.txt"
|
||||
verNum="5.4.2"
|
||||
GUIDIR="${HL}/LANforgeGUI_${verNum}"
|
||||
ST="/tmp/summary.txt"
|
||||
IP="192.168.95.239"
|
||||
IP="jed-centos7"
|
||||
|
||||
find "${GUIDIR}/down-check" -mmin 60 | grep "down-check"
|
||||
if [[ 0 == $? ]]; then
|
||||
ping "-q -c 4 ${IP}"
|
||||
ping -c2 -i1 -nq -w1 -W2 ${IP}
|
||||
if [[ 0 != $? ]]; then
|
||||
touch "${GUIDIR}/down-check"
|
||||
echo "Could not connect to ${IP}"
|
||||
@@ -23,6 +23,13 @@ if [[ 0 == $? ]]; then
|
||||
else
|
||||
rm "${GUIDIR}/down-check"
|
||||
fi
|
||||
else
|
||||
ping -c2 -i1 -nq -w1 -W2 ${IP}
|
||||
if [[ 0 != $? ]]; then
|
||||
touch "${GUIDIR}/down-check"
|
||||
echo "Could not connect to ${IP}"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
rm -f /tmp/*.txt
|
||||
|
||||
Reference in New Issue
Block a user