Merge pull request #962 from pi-hole/queryblacklist

Also query blacklist with pihole -q
This commit is contained in:
Mcat12 2016-12-05 18:11:26 -05:00 committed by GitHub
commit b6639d9e7e

5
pihole
View file

@ -69,8 +69,9 @@ setupLCDFunction() {
queryFunc() {
domain="${2}"
for list in /etc/pihole/list.*; do
count=$(grep ${domain} $list | wc -l)
lists=( /etc/pihole/list.* /etc/pihole/blacklist.txt)
for list in ${lists[@]}; do
count=$(grep -c ${domain} $list)
echo "::: ${list} (${count} results)"
if [[ ${count} > 0 ]]; then
grep ${domain} ${list}