Check for DNS before run.

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
Dan Schaper 2021-12-20 11:09:11 -08:00
parent a780fc59e2
commit 76ae75689c
No known key found for this signature in database
GPG key ID: 6055EE2AD4004FC0

View file

@ -898,7 +898,11 @@ if [[ "${forceDelete:-}" == true ]]; then
fi fi
# Gravity downloads blocklists next # Gravity downloads blocklists next
gravity_CheckDNSResolutionAvailable if [[ ! gravity_CheckDNSResolutionAvailable ]]; then
echo -e " ${CROSS} Can not complete gravity update, no DNS is available. Please contact support."
exit 1
fi
gravity_DownloadBlocklists gravity_DownloadBlocklists
# Create local.list # Create local.list