Test internet connection
-run scripts only if internet is ok
This commit is contained in:
@@ -40,8 +40,15 @@ elif [[ "$OSTYPE" == "linux_gnu" ]]; then
|
||||
elif [[ "$OSTYPE" == "linux_gnueabihf" ]]; then
|
||||
v=$HOME/venv
|
||||
fi
|
||||
#
|
||||
###############################################################################################
|
||||
|
||||
curl -Is http://www.google.com | head -1 | grep 200 1>/dev/null
|
||||
if [[ $? -eq 1 ]]; then
|
||||
echo -e "\n${red}No Internet connection !${reset}"
|
||||
echo -e "Exit !"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
################################################################################################
|
||||
|
||||
for app in ${apps[*]}
|
||||
do
|
||||
|
||||
Reference in New Issue
Block a user