Add DIG variable (#2576)

Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
This commit is contained in:
Daniel Hansson 2023-10-03 15:20:36 +02:00 committed by GitHub
parent 70755f416b
commit afd13db5c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

3
lib.sh
View File

@ -497,7 +497,8 @@ You can use this site to check if the IP seems correct: https://www.whatsmydns.n
fi
# Is the DNS record same as the external IP address of the server?
if dig +short "${1}" @resolver1.opendns.com | grep -q "$WANIP4"
DIG="$(dig +short "${1}" @resolver1.opendns.com)"
if "$DIG" | grep -q "$WANIP4"
then
print_text_in_color "$IGreen" "DNS seems correct when checking with dig!"
else