[ACME] Force renewal with force_renew file, docs will follow
This commit is contained in:
@@ -345,6 +345,7 @@ while true; do
|
||||
|
||||
# reload on new or changed certificates
|
||||
if [[ "${CERT_CHANGED}" == "1" ]]; then
|
||||
rm -f "${ACME_BASE}/force_renew" 2> /dev/null
|
||||
CERT_AMOUNT_CHANGED=${CERT_AMOUNT_CHANGED} /srv/reload-configurations.sh
|
||||
fi
|
||||
|
||||
|
@@ -39,8 +39,8 @@ else
|
||||
fi
|
||||
|
||||
if [[ -f ${DOMAINS_FILE} && "$(cat ${DOMAINS_FILE})" == "${CERT_DOMAINS[*]}" ]]; then
|
||||
if [[ ! -f ${CERT} || ! -f "${KEY}" ]]; then
|
||||
log_f "Certificate ${CERT} doesn't exist yet - start obtaining"
|
||||
if [[ ! -f ${CERT} || ! -f "${KEY}" || -f "${ACME_BASE}/force_renew" ]]; then
|
||||
log_f "Certificate ${CERT} doesn't exist yet or forced renewal - start obtaining"
|
||||
# Certificate exists and did not change but could be due for renewal (30 days)
|
||||
elif ! openssl x509 -checkend 2592000 -noout -in ${CERT} > /dev/null; then
|
||||
log_f "Certificate ${CERT} is due for renewal (< 30 days) - start renewing"
|
||||
|
Reference in New Issue
Block a user