From 4faf770cb647675f2076a6945d07ccdeb19a83f0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 4 Dec 2021 23:35:19 +0100 Subject: [PATCH] Only sleep if the certificate wasn't acquired --- entrypoint.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 3b642fe..1a46032 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -36,7 +36,11 @@ if [ -z "$ONLYRENEWCERTS" -a -z "$ONLYRENEWCERTSONCE" ]; then certbot certonly --agree-tos --cert-name "${DOMAIN}" \ --email "$EMAIL" --expand --non-interactive \ --domain "$DOMAIN" --standalone $STAGING - sleep 30 + + # If it failed, sleep before next try + if [ ! -f "/etc/letsencrypt/live/${DOMAIN}/fullchain.pem" ]; then + sleep 30 + fi # Correct permissions for multi user container/pod deployments # if not indicated otherwise