1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-12-22 14:58:08 +00:00

Merge pull request #2246 from pi-hole/fix/debug-simple-gravity-list

Update debug script for simple list format
This commit is contained in:
Mark Drobnak 2018-06-22 22:41:36 -04:00 committed by GitHub
commit 061510098c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -780,7 +780,8 @@ dig_at() {
# Find a random blocked url that has not been whitelisted. # Find a random blocked url that has not been whitelisted.
# This helps emulate queries to different domains that a user might query # This helps emulate queries to different domains that a user might query
# It will also give extra assurance that Pi-hole is correctly resolving and blocking domains # It will also give extra assurance that Pi-hole is correctly resolving and blocking domains
local random_url=$(shuf -n 1 "${PIHOLE_BLOCKLIST_FILE}" | awk -F ' ' '{ print $2 }') local random_url
random_url=$(shuf -n 1 "${PIHOLE_BLOCKLIST_FILE}")
# First, do a dig on localhost to see if Pi-hole can use itself to block a domain # First, do a dig on localhost to see if Pi-hole can use itself to block a domain
if local_dig=$(dig +tries=1 +time=2 -"${protocol}" "${random_url}" @${local_address} +short "${record_type}"); then if local_dig=$(dig +tries=1 +time=2 -"${protocol}" "${random_url}" @${local_address} +short "${record_type}"); then