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