diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-09-06 05:24:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-09-06 05:24:31 +0000 |
commit | 528988cb806e312c5bd2019f22d471a93feb922e (patch) | |
tree | b690b553bf9bb69d798e0f2e65589030b4c95d62 /dehydrated/bin/dehydrated-nsupdate | |
parent | Adding upstream version 20210905. (diff) | |
download | open-infrastructure-service-tools-528988cb806e312c5bd2019f22d471a93feb922e.tar.xz open-infrastructure-service-tools-528988cb806e312c5bd2019f22d471a93feb922e.zip |
Adding upstream version 20210906.upstream/20210906
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dehydrated/bin/dehydrated-nsupdate')
-rwxr-xr-x | dehydrated/bin/dehydrated-nsupdate | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/dehydrated/bin/dehydrated-nsupdate b/dehydrated/bin/dehydrated-nsupdate index 7b6ea34..b870e3b 100755 --- a/dehydrated/bin/dehydrated-nsupdate +++ b/dehydrated/bin/dehydrated-nsupdate @@ -79,7 +79,7 @@ do done # find txt record to update -CNAME="$(${DIG} "_acme-challenge.${DOMAIN}" 2>&1 | awk '/CNAME/ { print $5 }' | tail -n1)" +CNAME="$(${DIG} +nocomments +noquestion "_acme-challenge.${DOMAIN}" 2>&1 | grep -v '^;' | awk '/CNAME/ { print $5 }' | tail -n1)" if [ -n "${CNAME}" ] then @@ -93,10 +93,11 @@ ZONE="${TXT_RECORD}" while true do - NAMESERVERS="$(${DIG} NS "${ZONE}" 2>&1 | awk '/NS/ { print $5 }' | tail -n1)" + NAMESERVERS="$(${DIG} +nocomments +noquestion NS "${ZONE}" 2>&1 | grep -v '^;' | awk '/NS/ { print $5 }')" if [ -n "${NAMESERVERS}" ] then + ZONE="$(${DIG} +nocomments +noquestion NS "${ZONE}" 2>&1 | grep -v '^;' | awk '/NS/ { print $1 }' | tail -n1)" break else ZONE="$(echo "${ZONE}" | cut -d '.' -f 2-)" @@ -108,8 +109,6 @@ then NSUPDATE_OPTIONS="-k ${TSIG_KEYFILE}" fi -NAMESERVERS="$(${DIG} +short NS "${ZONE}")" - # update nameservers for NAMESERVER in ${NAMESERVERS} do |