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