From 4588a616520a3f738276747ea6fdaa96d0accebe Mon Sep 17 00:00:00 2001 From: Leonardo Mörlein Date: Thu, 25 Mar 2021 23:22:19 +0100 Subject: uacme: allow including run-uacme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With this commit, the run-acme script can be included into other scripts by setting INLCUDE_ONLY=1. Signed-off-by: Leonardo Mörlein --- net/uacme/files/run.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'net/uacme') diff --git a/net/uacme/files/run.sh b/net/uacme/files/run.sh index aafcad82f..10871da4c 100644 --- a/net/uacme/files/run.sh +++ b/net/uacme/files/run.sh @@ -403,9 +403,11 @@ load_vars() DEBUG=$(config_get "$section" debug) } -check_cron -[ -n "$CHECK_CRON" ] && exit 0 -[ -e "/var/run/acme_boot" ] && rm -f "/var/run/acme_boot" && exit 0 +if [ -z "$INCLUDE_ONLY" ]; then + check_cron + [ -n "$CHECK_CRON" ] && exit 0 + [ -e "/var/run/acme_boot" ] && rm -f "/var/run/acme_boot" && exit 0 +fi config_load acme config_foreach load_vars acme @@ -421,6 +423,8 @@ fi trap err_out HUP TERM trap int_out INT -config_foreach issue_cert cert +if [ -z "$INCLUDE_ONLY" ]; then + config_foreach issue_cert cert -exit 0 + exit 0 +fi -- cgit v1.2.3