mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +00:00
Merge pull request #2865 from ryrun/patch-1
quick fix for when dig also returns a CNAME
This commit is contained in:
commit
56e3565a9e
1 changed files with 1 additions and 1 deletions
|
@ -349,7 +349,7 @@ gravity_DownloadBlocklistFromUrl() {
|
|||
else
|
||||
printf -v port "%s" "${PIHOLE_DNS_1#*#}"
|
||||
fi
|
||||
ip=$(dig "@${ip_addr}" -p "${port}" +short "${domain}")
|
||||
ip=$(dig "@${ip_addr}" -p "${port}" +short "${domain}" | tail -1)
|
||||
if [[ $(echo "${url}" | awk -F '://' '{print $1}') = "https" ]]; then
|
||||
port=443;
|
||||
else port=80
|
||||
|
|
Loading…
Reference in a new issue