summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdebian/open-infrastructure-dehydrated-tools.postinst21
1 files changed, 21 insertions, 0 deletions
diff --git a/debian/open-infrastructure-dehydrated-tools.postinst b/debian/open-infrastructure-dehydrated-tools.postinst
index 48b5d0f..5e8ef42 100755
--- a/debian/open-infrastructure-dehydrated-tools.postinst
+++ b/debian/open-infrastructure-dehydrated-tools.postinst
@@ -241,6 +241,27 @@ EOF
if [ -n "${TSIG}" ]
then
case "${TSIG}" in
+ http*)
+ # tsig is a URL
+ if command -v wget "${TSIG}" -O /dev/null > /dev/null 2>&1
+ then
+ rm -f /etc/dehydrated/tsig.key
+
+ wget "${TSIG}" -O /etc/dehydrated/tsig.key
+ chmod 0600 /etc/dehydrated/tsig.key
+
+ TSIG_FILE="/etc/dehydrated/tsig.key"
+ elif command -v curl "${TSIG}" -o /dev/null > /dev/null 2>&1
+ then
+ rm -f /etc/dehydrated/tsig.key
+
+ curl "${TSIG}" -o /etc/dehydrated/tsig.key
+ chmod 0600 /etc/dehydrated/tsig.key
+
+ TSIG_FILE="/etc/dehydrated/tsig.key"
+ fi
+ ;;
+
*:*)
# tsig is a string
echo "${TSIG}" > /etc/dehydrated/tsig.key