feat: notify when renewal fails
This commit is contained in:
parent
3b136235f1
commit
48535f4382
1 changed files with 8 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue