From ce86157067b4de06462f6d220aba03f7b93adaa6 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sat, 8 Jan 2022 14:15:26 +0100 Subject: [PATCH] Fix gravity in case there are no adlists at all or all are disabled (#4535) Signed-off-by: DL6ER --- gravity.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/gravity.sh b/gravity.sh index a6ab3c86..2f24fbdb 100755 --- a/gravity.sh +++ b/gravity.sh @@ -402,14 +402,12 @@ gravity_DownloadBlocklists() { )" local str="Pulling blocklist source list into range" + echo -e "${OVER} ${TICK} ${str}" - if [[ -n "${sources[*]}" ]] && [[ -n "${sourceDomains[*]}" ]]; then - echo -e "${OVER} ${TICK} ${str}" - else - echo -e "${OVER} ${CROSS} ${str}" + if [[ -z "${sources[*]}" ]] || [[ -z "${sourceDomains[*]}" ]]; then echo -e " ${INFO} No source list found, or it is empty" echo "" - return 1 + unset sources fi local url domain agent cmd_ext str target compression