mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 13:01:52 -07:00
Bringing back Better handling of calm-down routine while LE renewing
Accidentally overwritten inf8b4d42b74
commit Original commit:3d8b6a87a7
Calming down is because https://github.com/serghey-rodin/vesta/issues/1193 issue
This commit is contained in:
parent
8010f5d802
commit
0d85c88d18
1 changed files with 6 additions and 5 deletions
|
@ -22,10 +22,11 @@ source $VESTA/conf/vesta.conf
|
||||||
# Action #
|
# Action #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
|
lecounter=0
|
||||||
|
|
||||||
# Checking user certificates
|
# Checking user certificates
|
||||||
for user in $($BIN/v-list-users plain |cut -f 1); do
|
for user in $($BIN/v-list-users plain |cut -f 1); do
|
||||||
USER_DATA=$VESTA/data/users/$user
|
USER_DATA=$VESTA/data/users/$user
|
||||||
lecounter=0
|
|
||||||
|
|
||||||
for domain in $(search_objects 'web' 'LETSENCRYPT' 'yes' 'DOMAIN'); do
|
for domain in $(search_objects 'web' 'LETSENCRYPT' 'yes' 'DOMAIN'); do
|
||||||
crt_data=$(openssl x509 -text -in $USER_DATA/ssl/$domain.crt)
|
crt_data=$(openssl x509 -text -in $USER_DATA/ssl/$domain.crt)
|
||||||
|
@ -35,6 +36,10 @@ for user in $($BIN/v-list-users plain |cut -f 1); do
|
||||||
seconds_valid=$((expiration - now))
|
seconds_valid=$((expiration - now))
|
||||||
days_valid=$((seconds_valid / 86400))
|
days_valid=$((seconds_valid / 86400))
|
||||||
if [[ "$days_valid" -lt 31 ]]; then
|
if [[ "$days_valid" -lt 31 ]]; then
|
||||||
|
if [ $lecounter -gt 0 ]; then
|
||||||
|
sleep 10
|
||||||
|
fi
|
||||||
|
((lecounter++))
|
||||||
aliases=$(echo "$crt_data" |grep DNS:)
|
aliases=$(echo "$crt_data" |grep DNS:)
|
||||||
aliases=$(echo "$aliases" |sed -e "s/DNS://g" -e "s/,//")
|
aliases=$(echo "$aliases" |sed -e "s/DNS://g" -e "s/,//")
|
||||||
aliases=$(echo "$aliases" |tr ' ' '\n' |sed "/^$/d")
|
aliases=$(echo "$aliases" |tr ' ' '\n' |sed "/^$/d")
|
||||||
|
@ -44,10 +49,6 @@ for user in $($BIN/v-list-users plain |cut -f 1); do
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "$domain $msg"
|
echo "$domain $msg"
|
||||||
fi
|
fi
|
||||||
if [ $lecounter -gt 0 ]; then
|
|
||||||
sleep 10
|
|
||||||
fi
|
|
||||||
((lecounter++))
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue