mirror of
https://github.com/myvesta/vesta
synced 2025-08-21 13:54:28 -07:00
get_web_counter LETSENCRYPT_FAIL_COUNT
This commit is contained in:
parent
80d43b9392
commit
6baf08f8d3
1 changed files with 6 additions and 0 deletions
|
@ -29,6 +29,12 @@ for user in $($BIN/v-list-users plain |cut -f 1); do
|
|||
USER_DATA=$VESTA/data/users/$user
|
||||
|
||||
for domain in $(search_objects 'web' 'LETSENCRYPT' 'yes' 'DOMAIN'); do
|
||||
|
||||
fail_counter=$(get_web_counter "$user" "$domain" 'LETSENCRYPT_FAIL_COUNT')
|
||||
if [[ "$fail_counter" -ge 3 ]]; then
|
||||
echo "$domain failed $fail_counter times for LetsEncrypt renewing, skipping"
|
||||
continue;
|
||||
fi
|
||||
crt_data=$(openssl x509 -text -in $USER_DATA/ssl/$domain.crt)
|
||||
not_after=$(echo "$crt_data" |grep "Not After" |cut -f 2,3,4 -d :)
|
||||
expiration=$(date -d "$not_after" +%s)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue