diff options
Diffstat (limited to '')
-rwxr-xr-x | debian/open-infrastructure-dehydrated-tools.postinst | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/debian/open-infrastructure-dehydrated-tools.postinst b/debian/open-infrastructure-dehydrated-tools.postinst index c571adb..698016b 100755 --- a/debian/open-infrastructure-dehydrated-tools.postinst +++ b/debian/open-infrastructure-dehydrated-tools.postinst @@ -236,22 +236,32 @@ EOF case "${TSIG}" in http*) # tsig is a URL - if command -v wget "${TSIG}" -O /dev/null > /dev/null 2>&1 + echo -n "Downloading tsig.key from '${TSIG}'..." + + if command -v wget -q "${TSIG}" -O /dev/null > /dev/null 2>&1 then rm -f /etc/dehydrated/tsig.key - wget "${TSIG}" -O /etc/dehydrated/tsig.key + wget -q "${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 + elif command -v curl -s "${TSIG}" -o /dev/null > /dev/null 2>&1 then rm -f /etc/dehydrated/tsig.key - curl "${TSIG}" -o /etc/dehydrated/tsig.key + curl -s "${TSIG}" -o /etc/dehydrated/tsig.key chmod 0600 /etc/dehydrated/tsig.key TSIG_FILE="/etc/dehydrated/tsig.key" + else + echo + echo "W: need wget or curl" >&2 + fi + + if [ -n "${TSIG_FILE}" ] + then + echo " done." fi ;; |