put conditional renewal logic into certbot loop
This commit is contained in:
parent
57c429078c
commit
66585d9765
|
@ -13,9 +13,15 @@ exit_code=0
|
||||||
set -x
|
set -x
|
||||||
# Loop over every domain we can find
|
# Loop over every domain we can find
|
||||||
for domain in $(parse_domains); do
|
for domain in $(parse_domains); do
|
||||||
if ! get_certificate $domain $CERTBOT_EMAIL; then
|
if is_renewal_required $domain; then
|
||||||
error "Cerbot failed for $domain. Check the logs for details."
|
if get_certificate $domain $CERTBOT_EMAIL; then
|
||||||
exit_code=1
|
update_renewal_timestamp $domain
|
||||||
|
else
|
||||||
|
error "Cerbot failed for $domain. Check the logs for details."
|
||||||
|
exit_code=1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Not run certbot for $domain; last renewal happened just recently."
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue