From 48535f438287fa94d200d3eb4d7172775698b37f Mon Sep 17 00:00:00 2001 From: f Date: Sat, 28 Dec 2024 13:32:53 -0300 Subject: [PATCH] feat: notify when renewal fails --- certbotd.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/certbotd.sh b/certbotd.sh index 88dd056..8ec71dd 100755 --- a/certbotd.sh +++ b/certbotd.sh @@ -50,8 +50,14 @@ set -E case $1 in # Renew certificates, trust in certbot's algorithms renew) - /usr/bin/certbot renew --quiet --agree-tos || true - touch "${updated}" + if /usr/bin/certbot renew --quiet --agree-tos ; then + ok "Renewed certificates" + touch "${updated}" + else + ret=$? + not_ok "Certificate renewal failed" + exit $ret + fi ;; bootstrap) test -d "/etc/letsencrypt/live/${SUTTY}" && exit 0