summaryrefslogtreecommitdiffstats
path: root/dehydrated
diff options
context:
space:
mode:
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."