summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-09-06 17:50:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-09-07 04:20:39 +0000
commit2556492ab92365c2bd68d528aff0b9a94f7bd95f (patch)
tree3015efa71a760e1c705c0dc2e2b73ebb0f58574b
parentAdding depends to ssl-cert to ensure group is present. (diff)
downloadopen-infrastructure-service-tools-2556492ab92365c2bd68d528aff0b9a94f7bd95f.tar.xz
open-infrastructure-service-tools-2556492ab92365c2bd68d528aff0b9a94f7bd95f.zip
Adding support to fetch dehydrated tsig file from URL.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-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