1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2024-11-24 08:32:50 +02:00

switch update.sh/check_online_status() from ping to curl to make it proxy ready

This commit is contained in:
thomas 2022-11-13 07:34:18 +01:00
parent eb9d360c0a
commit a6a7ab45f8

View File

@ -3,9 +3,9 @@
############## Begin Function Section ##############
check_online_status() {
CHECK_ONLINE_IPS=(1.1.1.1 9.9.9.9 8.8.8.8)
for ip in "${CHECK_ONLINE_IPS[@]}"; do
if timeout 3 ping -c 1 ${ip} > /dev/null; then
CHECK_ONLINE_DOMAINS=('https://github.com')
for domain in "${CHECK_ONLINE_DOMAINS[@]}"; do
if timeout 3 curl --head --silent --output /dev/null ${domain}; then
return 0
fi
done