summaryrefslogtreecommitdiffstats
path: root/dehydrated/bin
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2021-09-04 15:56:28 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2021-09-04 15:58:45 +0000
commitfd905c94fc3419b5ba934d9861aabd897f36f7e2 (patch)
tree39bdbf0bc30ad436cebcbbfd7847374767319d12 /dehydrated/bin
parentReading configuration files in dehydrated-nsupdate for future tsig support. (diff)
downloadservice-tools-fd905c94fc3419b5ba934d9861aabd897f36f7e2.tar.xz
service-tools-fd905c94fc3419b5ba934d9861aabd897f36f7e2.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 '')
-rwxr-xr-xdehydrated/bin/dehydrated-nsupdate10
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."