Merge pull request #571 from nextcloud/enh/565/dns-resolution

check the DNS resolving on startup
This commit is contained in:
Simon L 2022-05-09 15:42:09 +02:00 committed by GitHub
commit f508e7b33a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -123,6 +123,16 @@ It is set to '$APACHE_PORT'."
fi
fi
# Check DNS resolution
# Prevents issues like https://github.com/nextcloud/all-in-one/discussions/565
curl https://nextcloud.com &>/dev/null
if [ "$?" = 6 ]; then
echo "Could not resolve the host nextcloud.com."
echo "Most likely the DNS resolving does not work."
echo "You should be able to fix this by adding the '--dns=\"ip.address.of.dns.server\"' option to the docker run command."
exit 1
fi
# Add important folders
mkdir -p /mnt/docker-aio-config/data/
mkdir -p /mnt/docker-aio-config/session/