summaryrefslogtreecommitdiffstats
path: root/dehydrated
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2022-01-05 06:57:23 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2022-01-05 07:00:37 +0000
commitb0721cd95a13d5348b78ed6c994b986d3a81de21 (patch)
tree8de96ff569dd3d0b2e0c6efce2e51ca7e76838e9 /dehydrated
parentUpdating copyright notices for 2022. (diff)
downloadservice-tools-b0721cd95a13d5348b78ed6c994b986d3a81de21.tar.xz
service-tools-b0721cd95a13d5348b78ed6c994b986d3a81de21.zip
Temporarily reverting json support in dehydrated-nsupdate, not ready just yet.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'dehydrated')
-rwxr-xr-xdehydrated/bin/dehydrated-nsupdate44
-rw-r--r--dehydrated/share/man/dehydrated-nsupdate.1.rst3
2 files changed, 4 insertions, 43 deletions
diff --git a/dehydrated/bin/dehydrated-nsupdate b/dehydrated/bin/dehydrated-nsupdate
index dd3b405..fa421ea 100755
--- a/dehydrated/bin/dehydrated-nsupdate
+++ b/dehydrated/bin/dehydrated-nsupdate
@@ -46,19 +46,6 @@ if command -v kdig > /dev/null 2>&1
then
# knot-dnsutils
DIG="kdig +noidn"
-
- # out-of-tree json output support
- if kdig +json > /dev/null 2>&1
- then
- DIG="${DIG} +json"
- KDIG_JSON="true"
-
- if ! command -v jq > /dev/null 2>&1
- then
- echo "'${HOOK}': need jq for knot-dnsutils with json output" >&2
- exit 1
- fi
- fi
elif command -v dig > /dev/null 2>&1
then
# bind-dnsutils
@@ -92,15 +79,7 @@ do
done
# find txt record to update
-case "${KDIG_JSON}" in
- true)
- CNAME="$(${DIG} "_acme-challenge.${DOMAIN}" | jq -r -M '.answer | .[] | .rdata' | tail -n1)"
- ;;
-
- *)
- CNAME="$(${DIG} +nocomments +noquestion "_acme-challenge.${DOMAIN}" 2>&1 | grep -v '^;' | awk '/CNAME/ { print $5 }' | tail -n1)"
- ;;
-esac
+CNAME="$(${DIG} +nocomments +noquestion "_acme-challenge.${DOMAIN}" 2>&1 | grep -v '^;' | awk '/CNAME/ { print $5 }' | tail -n1)"
if [ -n "${CNAME}" ]
then
@@ -114,28 +93,11 @@ ZONE="${TXT_RECORD}"
while true
do
- case "${KDIG_JSON}" in
- true)
- NAMESERVERS="$(${DIG} NS "${ZONE}" | jq -r -M '.answer | .[] | .rdata')"
- ;;
-
- *)
- NAMESERVERS="$(${DIG} +nocomments +noquestion NS "${ZONE}" 2>&1 | grep -v '^;' | awk '/NS/ { print $5 }')"
- ;;
- esac
+ NAMESERVERS="$(${DIG} +nocomments +noquestion NS "${ZONE}" 2>&1 | grep -v '^;' | awk '/NS/ { print $5 }')"
if [ -n "${NAMESERVERS}" ]
then
- case "${KDIG_JSON}" in
- true)
- ZONE="$(${DIG} NS "${ZONE}" | jq -r -M '.answer | .[] | .rdata' | tail -n1)"
- ;;
-
- *)
- ZONE="$(${DIG} +nocomments +noquestion NS "${ZONE}" 2>&1 | grep -v '^;' | awk '/NS/ { print $1 }' | tail -n1)"
- ;;
- esac
-
+ ZONE="$(${DIG} +nocomments +noquestion NS "${ZONE}" 2>&1 | grep -v '^;' | awk '/NS/ { print $1 }' | tail -n1)"
break
else
ZONE="$(echo "${ZONE}" | cut -d '.' -f 2-)"
diff --git a/dehydrated/share/man/dehydrated-nsupdate.1.rst b/dehydrated/share/man/dehydrated-nsupdate.1.rst
index f1a8c4a..058785f 100644
--- a/dehydrated/share/man/dehydrated-nsupdate.1.rst
+++ b/dehydrated/share/man/dehydrated-nsupdate.1.rst
@@ -73,8 +73,7 @@ Features
| **dehydrated-nsupdate** removes records after succesfull verification.
| **bind9-dnsutils and knot-dnsutils support*
-| **dehydrated-nsupdate** works with both nsupdate (bind9) and knsupdate (knot),
-| including support for kdigs out-of-tree json output.
+| **dehydrated-nsupdate** works with both nsupdate (bind9) and knsupdate (knot).
| **IDN handling**
| **dehydrated-nsupdate** works with IDN domains by not expanding the punycode.