fail statefile

This commit is contained in:
Jack L. Frost 2016-05-27 13:36:04 +03:00
parent 6af8aafd4a
commit 1b232d906f
1 changed files with 8 additions and 1 deletions

View File

@ -70,6 +70,11 @@ main() {
return 1
fi
if [[ -f "$cfg_dir/domains/$certname/renew.fail" ]]; then
err "Fail flag exists: $cfg_dir/domains/$certname/renew.fail, not attempting renew."
return 2
fi
if ! openssl x509 -checkend "$checkend_seconds" < "$cfg_dir/domains/$certname/certificate.pem"; then
if ! (( "${#domains[@]}" )); then
if [[ -f "$cfg_dir/domains/$certname/renew.cfg" ]]; then
@ -83,7 +88,9 @@ main() {
le_args+=( '-d' "$d" )
done
le "${le_args[@]}"
if ! le "${le_args[@]}"; then
> "$cfg_dir/domains/$certname/renew.fail"
fi
fi
}