Only sleep if the certificate wasn't acquired

This commit is contained in:
Nico Schottelius 2021-12-04 23:35:19 +01:00
parent ce842d851b
commit 4faf770cb6

View file

@ -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
# 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