summaryrefslogtreecommitdiffstats
path: root/debian/open-infrastructure-dehydrated-tools.postinst
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-08-28 09:57:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-08-28 10:28:10 +0000
commit4673fc80dddafa45ce8d577d572323eec9fdfe2e (patch)
tree8b0321145abdb8f23436ea849b865fb4f8768526 /debian/open-infrastructure-dehydrated-tools.postinst
parentAllowing to specify 'ALL' in dehydrated hooks preseeding. (diff)
downloadopen-infrastructure-service-tools-4673fc80dddafa45ce8d577d572323eec9fdfe2e.tar.xz
open-infrastructure-service-tools-4673fc80dddafa45ce8d577d572323eec9fdfe2e.zip
Run dehydration registration only when no account is already present.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xdebian/open-infrastructure-dehydrated-tools.postinst13
1 files changed, 8 insertions, 5 deletions
diff --git a/debian/open-infrastructure-dehydrated-tools.postinst b/debian/open-infrastructure-dehydrated-tools.postinst
index fdf39dc..16f1e4d 100755
--- a/debian/open-infrastructure-dehydrated-tools.postinst
+++ b/debian/open-infrastructure-dehydrated-tools.postinst
@@ -143,11 +143,14 @@ case "${1}" in
Install "${BASEDIR}" "${NEW_BASEDIR}"
fi
- case "${REGISTER}" in
- true)
- dehydrated --register --accept-terms
- ;;
- esac
+ if ! ls /var/lib/dehydrated/accounts/*/account_key.pem > /dev/null 2>&1
+ then
+ case "${REGISTER}" in
+ true)
+ dehydrated --register --accept-terms
+ ;;
+ esac
+ fi
;;
abort-upgrade|abort-remove|abort-deconfigure)