From 978271b0686cff2c3df26d43728e44d18e9208d2 Mon Sep 17 00:00:00 2001 From: szaimen Date: Sun, 30 Aug 2020 21:27:05 +0200 Subject: [PATCH] update domain_check_200 to allow CNAME tags (#1392) Co-authored-by: Daniel Hansson --- lib.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib.sh b/lib.sh index 290838ab..785aa502 100644 --- a/lib.sh +++ b/lib.sh @@ -279,12 +279,10 @@ domain_check_200() { fi # Is the DNS record same as the external IP address of the server? - DIG="$(dig +short "${1}" @resolver1.opendns.com)" - if [[ "$DIG" = "$WANIP4" ]] + if dig +short "${1}" @resolver1.opendns.com | grep -q "$WANIP4" then print_text_in_color "$IGreen" "DNS seems correct when checking with dig!" - elif [[ "$DIG" != "$WANIP4" ]] - then + else msg_box "DNS lookup failed with dig. The external IP ($WANIP4) address of this server is not the same as the A-record ($DIG). Please check your DNS settings! Maybe the domain isn't propagated? Please check https://www.whatsmydns.net/#A/${1} if the IP seems correct."