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
|
@ -263,7 +263,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 New Issue