summaryrefslogtreecommitdiffstats
path: root/dehydrated
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xdehydrated/bin/dehydrated-nsupdate5
1 files changed, 4 insertions, 1 deletions
diff --git a/dehydrated/bin/dehydrated-nsupdate b/dehydrated/bin/dehydrated-nsupdate
index 5bb253a..05027ab 100755
--- a/dehydrated/bin/dehydrated-nsupdate
+++ b/dehydrated/bin/dehydrated-nsupdate
@@ -163,7 +163,10 @@ do
KEY=""
fi
- if [ -n "${KEY}" ]
+ # ignoring comments to allow empty keyfiles to disable TSIG individually
+ TSIG="$(grep -sv '^#' "${KEY}" || true)"
+
+ if [ -n "${KEY}" ] && [ -n "${TSIG}" ]
then
NSUPDATE_OPTIONS="-k ${KEY}"
fi