mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 10:37:42 -07:00
Update v-update-letsencrypt-ssl
This commit is contained in:
parent
be9710f9ea
commit
3611b888e5
1 changed files with 7 additions and 3 deletions
|
@ -33,16 +33,20 @@ for user in $($BIN/v-list-users plain |cut -f 1); do
|
|||
|
||||
for domain in $(search_objects 'web' 'LETSENCRYPT' 'yes' 'DOMAIN'); do
|
||||
|
||||
limit_check=1
|
||||
fail_counter=$(get_web_counter "$user" "$domain" 'LETSENCRYPT_FAIL_COUNT')
|
||||
|
||||
if [[ "$fail_counter" -eq 7 ]]; then
|
||||
if [ "$hostname" = "$domain" ]; then
|
||||
if [[ "$hostname" = "$domain" ]]; then
|
||||
if [[ "$fail_counter" -eq 7 ]]; then
|
||||
limit_check=0
|
||||
fi
|
||||
if [[ "$fail_counter" -eq 8 ]]; then
|
||||
fail_counter=$(alter_web_counter "$user" "$domain" 'LETSENCRYPT_FAIL_COUNT')
|
||||
send_email_to_admin "LetsEncrypt renewing hostname $hostname" "Warning: hostname $domain failed for LetsEncrypt renewing"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$fail_counter" -ge 7 ]]; then
|
||||
if [[ "$fail_counter" -ge 7 ]] && [[ "$limit_check" -eq 1 ]]; then
|
||||
# echo "$domain failed $fail_counter times for LetsEncrypt renewing, skipping"
|
||||
echo "[$(date)] : $domain failed $fail_counter times for LetsEncrypt renewing, skipping" >> /usr/local/vesta/log/letsencrypt_cron.log
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue