From 76ae75689c9c2a20266cd4dc4d2ec098a08d215a Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Mon, 20 Dec 2021 11:09:11 -0800 Subject: [PATCH] Check for DNS before run. Signed-off-by: Dan Schaper --- gravity.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gravity.sh b/gravity.sh index 81bca09d..f3754a9f 100755 --- a/gravity.sh +++ b/gravity.sh @@ -898,7 +898,11 @@ if [[ "${forceDelete:-}" == true ]]; then fi # 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 # Create local.list