diff options
author | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2021-09-04 15:56:28 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2021-09-04 16:21:31 +0000 |
commit | 297cd11c51dac5f687e3349be5a220058bfb88ef (patch) | |
tree | 691f99c2b8fa7a83a1763d2874f6f3361d790fa5 /dehydrated/bin/dehydrated-nsupdate | |
parent | Reading configuration files in dehydrated-nsupdate for future tsig support. (diff) | |
download | service-tools-297cd11c51dac5f687e3349be5a220058bfb88ef.tar.xz service-tools-297cd11c51dac5f687e3349be5a220058bfb88ef.zip |
Using less confusing variable name for the txt record to update in dehydrated-nsupdate.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to 'dehydrated/bin/dehydrated-nsupdate')
-rwxr-xr-x | dehydrated/bin/dehydrated-nsupdate | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/dehydrated/bin/dehydrated-nsupdate b/dehydrated/bin/dehydrated-nsupdate index 4894f16..6bb618c 100755 --- a/dehydrated/bin/dehydrated-nsupdate +++ b/dehydrated/bin/dehydrated-nsupdate @@ -64,13 +64,13 @@ CNAME="$(${DIG} "_acme-challenge.${DOMAIN}" 2>&1 | awk '/CNAME/ { print $5 }' | if [ -n "${CNAME}" ] then - UPDATE_DOMAIN="${CNAME}" + TXT_RECORD="${CNAME}" else - UPDATE_DOMAIN="_acme-challenge.${DOMAIN}" + TXT_RECORD="_acme-challenge.${DOMAIN}" fi # find nameservers to update -ZONE="${UPDATE_DOMAIN}" +ZONE="${TXT_RECORD}" while true do @@ -89,12 +89,12 @@ NAMESERVERS="$(${DIG} +short NS "${ZONE}")" # update nameservers for NAMESERVER in ${NAMESERVERS} do - echo -n " + Adding TXT record (${UPDATE_DOMAIN})..." + echo -n " + Adding TXT record (${TXT_RECORD})..." echo "server ${NAMESERVER} zone ${ZONE} ttl 0 -update ${HOOK_ACTION} ${UPDATE_DOMAIN} 0 TXT ${TOKEN_VALUE} +update ${HOOK_ACTION} ${TXT_RECORD} 0 TXT ${TOKEN_VALUE} send" | "${NSUPDATE}" echo " done." |