use new internet connectivity test
This commit is contained in:
@ -37,13 +37,10 @@ for ((n=0;n<5;n++)); do
|
||||
fi
|
||||
echo -e "${IYELLOW}download failed${NO_COLOR}"
|
||||
|
||||
if ! ping -qc 3 v4.ip.hopeless-cloud.xyz > /dev/null 2>&1; then
|
||||
echo -e "${IYELLOW}no internet${NO_COLOR}"
|
||||
exit 1
|
||||
elif ! ping -qc 3 v6.ip.hopeless-cloud.xyz > /dev/null 2>&1; then
|
||||
echo -e "${IYELLOW}no internet${NO_COLOR}"
|
||||
exit 1
|
||||
else
|
||||
if has_internet; then
|
||||
echo -e "${IGREEN}has internet${NO_COLOR}"
|
||||
else
|
||||
echo -e "${IYELLOW}no internet${NO_COLOR}"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
@ -26,14 +26,11 @@ download() {
|
||||
fi
|
||||
echo -e "${IYELLOW}download failed${NO_COLOR}"
|
||||
|
||||
if ! ping -qc 3 v4.ip.hopeless-cloud.xyz > /dev/null 2>&1; then
|
||||
echo -e "${IYELLOW}no internet${NO_COLOR}"
|
||||
exit 1
|
||||
elif ! ping -qc 3 v6.ip.hopeless-cloud.xyz > /dev/null 2>&1; then
|
||||
echo -e "${IYELLOW}no internet${NO_COLOR}"
|
||||
exit 1
|
||||
else
|
||||
if has_internet; then
|
||||
echo -e "${IGREEN}has internet${NO_COLOR}"
|
||||
else
|
||||
echo -e "${IYELLOW}no internet${NO_COLOR}"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
|
Reference in New Issue
Block a user