summaryrefslogtreecommitdiffstats
path: root/dehydrated/bin/dehydrated-nsupdate
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2021-09-04 15:43:36 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2021-09-04 15:43:36 +0000
commit3009c534d01dd891f22c92fe66e95de94fb3acda (patch)
treeb3118fe016a90b125830f735d232f9d0c65fef6d /dehydrated/bin/dehydrated-nsupdate
parentAdding knot tools. (diff)
downloadservice-tools-3009c534d01dd891f22c92fe66e95de94fb3acda.tar.xz
service-tools-3009c534d01dd891f22c92fe66e95de94fb3acda.zip
Reading configuration files in dehydrated-nsupdate for future tsig support.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to 'dehydrated/bin/dehydrated-nsupdate')
-rwxr-xr-xdehydrated/bin/dehydrated-nsupdate9
1 files changed, 9 insertions, 0 deletions
diff --git a/dehydrated/bin/dehydrated-nsupdate b/dehydrated/bin/dehydrated-nsupdate
index f901d2e..4894f16 100755
--- a/dehydrated/bin/dehydrated-nsupdate
+++ b/dehydrated/bin/dehydrated-nsupdate
@@ -50,6 +50,15 @@ else
exit 1
fi
+# config
+for FILE in /etc/default/dehydrated-nsupdate /etc/default/dehydrated-nsupdate.d/*
+do
+ if [ -e "${FILE}" ]
+ then
+ . "${FILE}"
+ fi
+done
+
# find txt record to update
CNAME="$(${DIG} "_acme-challenge.${DOMAIN}" 2>&1 | awk '/CNAME/ { print $5 }' | tail -n1)"