From 297cd11c51dac5f687e3349be5a220058bfb88ef Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 Sep 2021 17:56:28 +0200 Subject: Using less confusing variable name for the txt record to update in dehydrated-nsupdate. Signed-off-by: Daniel Baumann --- dehydrated/bin/dehydrated-nsupdate | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'dehydrated/bin') 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." -- cgit v1.2.3