From 69dba022c4cc9872fe3ea64b4d6ddcbbf438712f Mon Sep 17 00:00:00 2001 From: Chris Crocker-White Date: Mon, 27 May 2019 10:27:28 -0700 Subject: [PATCH] Handle an empty local.list Handle the case of an empty local.list file which would otherwise prevent the system from starting Change-type: patch Signed-off-by: Chris Crocker-White --- gravity.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gravity.sh b/gravity.sh index b41e8893..1fe2b4e3 100755 --- a/gravity.sh +++ b/gravity.sh @@ -184,8 +184,8 @@ migrate_to_database() { gravity_CheckDNSResolutionAvailable() { local lookupDomain="pi.hole" - # Determine if $localList does not exist - if [[ ! -e "${localList}" ]]; then + # Determine if $localList does not exist, and ensure it is not empty + if [[ ! -e "${localList}" ]] || [[ -s "${localList}" ]]; then lookupDomain="raw.githubusercontent.com" fi