mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +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
1 changed files with 3 additions and 3 deletions
6
pihole
6
pihole
|
@ -106,12 +106,12 @@ queryFunc() {
|
||||||
domain="${2}"
|
domain="${2}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Scan Blacklist and Wildcards
|
# Scan Whitelist, Blacklist and Wildcards
|
||||||
lists="/etc/pihole/blacklist.txt $wildcardlist"
|
lists="/etc/pihole/whitelist.txt /etc/pihole/blacklist.txt $wildcardlist"
|
||||||
result=$(scanList ${domain} "${lists}" ${method})
|
result=$(scanList ${domain} "${lists}" ${method})
|
||||||
if [ -n "$result" ]; then
|
if [ -n "$result" ]; then
|
||||||
echo "$result"
|
echo "$result"
|
||||||
exit 0
|
[ ! -t 1 ] && exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Scan Domains lists
|
# Scan Domains lists
|
||||||
|
|
Loading…
Reference in a new issue