feat: notify when renewal fails

This commit is contained in:
f 2024-12-28 13:32:53 -03:00
parent 3b136235f1
commit 48535f4382
No known key found for this signature in database

View file

@ -50,8 +50,14 @@ set -E
case $1 in case $1 in
# Renew certificates, trust in certbot's algorithms # Renew certificates, trust in certbot's algorithms
renew) renew)
/usr/bin/certbot renew --quiet --agree-tos || true if /usr/bin/certbot renew --quiet --agree-tos ; then
ok "Renewed certificates"
touch "${updated}" touch "${updated}"
else
ret=$?
not_ok "Certificate renewal failed"
exit $ret
fi
;; ;;
bootstrap) bootstrap)
test -d "/etc/letsencrypt/live/${SUTTY}" && exit 0 test -d "/etc/letsencrypt/live/${SUTTY}" && exit 0