mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-25 06:10:20 +00:00
quick fix for when dig also returns a CNAME
Signed-off-by: Andreas <ryrun@online.de>
This commit is contained in:
parent
ab1ea5a366
commit
c53be459c6
1 changed files with 1 additions and 1 deletions
|
@ -263,7 +263,7 @@ gravity_DownloadBlocklistFromUrl() {
|
||||||
else
|
else
|
||||||
printf -v port "%s" "${PIHOLE_DNS_1#*#}"
|
printf -v port "%s" "${PIHOLE_DNS_1#*#}"
|
||||||
fi
|
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
|
if [[ $(echo "${url}" | awk -F '://' '{print $1}') = "https" ]]; then
|
||||||
port=443;
|
port=443;
|
||||||
else port=80
|
else port=80
|
||||||
|
|
Loading…
Reference in a new issue