From ec06fd0ad413823b56503711cbe18914429a75da Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Sat, 4 May 2019 11:35:21 -0700 Subject: [PATCH] Fix incorrect adlist query when an adlist is blocked during gravity hosts-file.net was hard-coded as the domain to check instead of the actual domain. Signed-off-by: Mcat12 --- gravity.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gravity.sh b/gravity.sh index 75a51608..ff0343e9 100755 --- a/gravity.sh +++ b/gravity.sh @@ -268,7 +268,7 @@ gravity_DownloadBlocklistFromUrl() { port=443; else port=80 fi - bad_list=$(pihole -q -adlist hosts-file.net | head -n1 | awk -F 'Match found in ' '{print $2}') + bad_list=$(pihole -q -adlist "${domain}" | head -n1 | awk -F 'Match found in ' '{print $2}') echo -e "${OVER} ${CROSS} ${str} ${domain} is blocked by ${bad_list%:}. Using DNS on ${PIHOLE_DNS_1} to download ${url}"; echo -ne " ${INFO} ${str} Pending..." cmd_ext="--resolve $domain:$port:$ip $cmd_ext"