Commit 71b3f098 authored by Mujeeb Rahman's avatar Mujeeb Rahman

Rewrite internet connectivity check

parent 54f9c096
......@@ -51,11 +51,12 @@ fi
# Check for network connectivity
FQDN=`echo $SERVER | cut -d'/' -f3 | cut -d':' -f1`
if ! ping -q -c 1 -W 1 $FQDN >/dev/null; then
wget -q --spider $FQDN
if [ $? -ne 0 ]; then
zenity --error \
--width=300 \
--height=100 \
--text="Please check your internet connection and try again."
--text="Internet Or Server is not available."
exit 1
fi
errors=0
......@@ -179,4 +180,4 @@ if [[ $errors > 0 ]]; then
exit 1
else
exit 0
fi
\ No newline at end of file
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment