Fix (non)glue-record check
This commit is contained in:
parent
1fd47a344b
commit
b95337ab6f
@ -13,11 +13,6 @@
|
||||
|
||||
check_gluerecords() {
|
||||
echo -ne "\n* Checking glue records for $DOMAIN_NEW.."
|
||||
if host -t ns ${DOMAIN_NEW} |grep -E '\.dns\.fedcom\.net\.$'; then
|
||||
echo "Not needed (using dns.fedcom.net)"
|
||||
return
|
||||
fi
|
||||
|
||||
local DOMAIN_PARENT=$(echo $DOMAIN_NEW |cut -d. -f2-)
|
||||
local NS_PARENT=""
|
||||
while true; do
|
||||
@ -37,6 +32,12 @@ check_gluerecords() {
|
||||
# fed.a.b NS something
|
||||
DOMAIN_PARENT="$(echo $DOMAIN_PARENT |cut -d. -f2-)"
|
||||
done
|
||||
|
||||
if dig +noall +authority +additional +norecurse @"$NS_PARENT" NS "$DOMAIN_NEW". | grep NS | grep -iE '\.dns\.fedcom\.net\.'; then
|
||||
echo "Not needed (using dns.fedcom.net)"
|
||||
return
|
||||
fi
|
||||
|
||||
CHECK_NS1=`dig +noall +authority +additional +norecurse @"$NS_PARENT" NS "$DOMAIN_NEW". | grep NS | grep -i ns1.$DOMAIN_NEW`
|
||||
[ $? -ne 0 ] && failcheck "Couldn't find glue / authoritative NS record ns1.$DOMAIN_NEW"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user