Update queryFunc() to search Whitelist

If there is a match in Whitelist/Blacklist/Wildcards, `[ ! -t 1 ]` will cause the search to end if the terminal is closed when the script is called. This has the intended effect of allowing a user to search for a W/B/W domain (as well as all the adlists it's found in) using `pihole -q` via Terminal, but the script will stop searching after a W/B/W match when called by the block page.
pull/1456/head
WaLLy3K 7 years ago committed by GitHub
parent 5e0572637e
commit 58353e2839

@ -106,12 +106,12 @@ queryFunc() {
domain="${2}"
fi
# Scan Blacklist and Wildcards
lists="/etc/pihole/blacklist.txt $wildcardlist"
# Scan Whitelist, Blacklist and Wildcards
lists="/etc/pihole/whitelist.txt /etc/pihole/blacklist.txt $wildcardlist"
result=$(scanList ${domain} "${lists}" ${method})
if [ -n "$result" ]; then
echo "$result"
exit 0
[ ! -t 1 ] && exit 0
fi
# Scan Domains lists

Loading…
Cancel
Save