use new internet connectivity test

This commit is contained in:
2025-04-22 00:10:00 +02:00
parent ad2f79cba9
commit afcf62c4d9
2 changed files with 8 additions and 14 deletions

View File

@ -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

View File

@ -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