Skip to content

Commit afd13db

Browse files
authored
Add DIG variable (#2576)
Signed-off-by: Daniel Hansson <[email protected]>
1 parent 70755f4 commit afd13db

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,8 @@ You can use this site to check if the IP seems correct: https://www.whatsmydns.n
497497
fi
498498

499499
# Is the DNS record same as the external IP address of the server?
500-
if dig +short "${1}" @resolver1.opendns.com | grep -q "$WANIP4"
500+
DIG="$(dig +short "${1}" @resolver1.opendns.com)"
501+
if "$DIG" | grep -q "$WANIP4"
501502
then
502503
print_text_in_color "$IGreen" "DNS seems correct when checking with dig!"
503504
else

0 commit comments

Comments
 (0)