mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 06:48:07 +00:00
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.
This commit is contained in:
parent
5e0572637e
commit
58353e2839
6
pihole
6
pihole
@ -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…
Reference in New Issue
Block a user