fix: sync after failing renewal

This commit is contained in:
f 2024-12-28 17:11:49 -03:00
parent c75818e3a4
commit 45ad6d1e71
No known key found for this signature in database

View file

@ -64,13 +64,16 @@ case $1 in
# Renew certificates, trust in certbot's algorithms # Renew certificates, trust in certbot's algorithms
renew) renew)
if /usr/bin/certbot renew --quiet --agree-tos ; then if /usr/bin/certbot renew --quiet --agree-tos ; then
ret=0
ok "Renewed certificates" ok "Renewed certificates"
touch "${updated}"
else else
ret=$? ret=$?
not_ok "Certificate renewal failed" not_ok "Certificate renewal failed"
exit $ret
fi fi
# Sync anyway in case just some certificates failed
touch "${updated}"
ensure $ret
;; ;;
bootstrap) bootstrap)
test -d "/etc/letsencrypt/live/${SUTTY}" && exit 0 test -d "/etc/letsencrypt/live/${SUTTY}" && exit 0