From ac013f7801d4bc37ace15374d7a797855c46f12f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 13 Dec 2021 15:00:28 +0100 Subject: Adding dehydrated debconf question to run dehydrated. Signed-off-by: Daniel Baumann --- debian/open-infrastructure-dehydrated-tools.config | 4 ++++ debian/open-infrastructure-dehydrated-tools.postinst | 10 ++++++++++ debian/open-infrastructure-dehydrated-tools.templates | 7 +++++++ 3 files changed, 21 insertions(+) diff --git a/debian/open-infrastructure-dehydrated-tools.config b/debian/open-infrastructure-dehydrated-tools.config index 2918b46..8ff3177 100644 --- a/debian/open-infrastructure-dehydrated-tools.config +++ b/debian/open-infrastructure-dehydrated-tools.config @@ -68,4 +68,8 @@ db_settitle open-infrastructure-dehydrated-tools/title db_input low open-infrastructure-dehydrated-tools/register "${REGISTER}" || true db_go +db_settitle open-infrastructure-dehydrated-tools/title +db_input low open-infrastructure-dehydrated-tools/run "${RUN}" || true +db_go + db_stop diff --git a/debian/open-infrastructure-dehydrated-tools.postinst b/debian/open-infrastructure-dehydrated-tools.postinst index 9376f8c..c571adb 100755 --- a/debian/open-infrastructure-dehydrated-tools.postinst +++ b/debian/open-infrastructure-dehydrated-tools.postinst @@ -87,6 +87,9 @@ case "${1}" in db_get open-infrastructure-dehydrated-tools/register REGISTER="${RET}" # boolean + db_get open-infrastructure-dehydrated-tools/run + RUN="${RET}" # boolean + db_stop case "${AUTO_CLEANUP}" in @@ -306,6 +309,13 @@ EOF dehydrated --register --accept-terms ;; esac + + case "${RUN}" in + true) + dehydrated --cron --keep-going + ;; + esac + ;; abort-upgrade|abort-remove|abort-deconfigure) diff --git a/debian/open-infrastructure-dehydrated-tools.templates b/debian/open-infrastructure-dehydrated-tools.templates index ae72683..08c525e 100644 --- a/debian/open-infrastructure-dehydrated-tools.templates +++ b/debian/open-infrastructure-dehydrated-tools.templates @@ -92,3 +92,10 @@ Default: false Description: dehydrated register: Should a 'dehydrated --register --accept-terms' be executed now to create an account for this system with your CA. + +Template: open-infrastructure-dehydrated-tools/run +Type: boolean +Default: false +Description: dehydrated: + Should a 'dehydrated --cron --keep-going' be executed now to renew + non-existent/changed/expiring certificates for this system. -- cgit v1.2.3