mirror of
https://github.com/pi-hole/pi-hole
synced 2025-01-03 04:30:55 +00:00
Split declaration and assignment of random_url
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
parent
e71492a2b3
commit
868948509a
@ -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}")
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user