mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 21:04:07 -07:00
Better handling of calm-down routine while LE renewing
Sleep is because https://github.com/serghey-rodin/vesta/issues/1193
This commit is contained in:
parent
58c6ca95b1
commit
3d8b6a87a7
1 changed files with 6 additions and 5 deletions
|
@ -25,11 +25,12 @@ source $VESTA/conf/vesta.conf
|
||||||
# Defining user list
|
# Defining user list
|
||||||
users=$($BIN/v-list-users | tail -n+3 | awk '{ print $1 }')
|
users=$($BIN/v-list-users | tail -n+3 | awk '{ print $1 }')
|
||||||
|
|
||||||
|
lecounter=0
|
||||||
|
|
||||||
# Checking users
|
# Checking users
|
||||||
for user in $users; do
|
for user in $users; do
|
||||||
USER_DATA=$VESTA/data/users/$user
|
USER_DATA=$VESTA/data/users/$user
|
||||||
# Checking user certificates
|
# Checking user certificates
|
||||||
lecounter=0
|
|
||||||
for domain in $(search_objects 'web' 'LETSENCRYPT' 'yes' 'DOMAIN'); do
|
for domain in $(search_objects 'web' 'LETSENCRYPT' 'yes' 'DOMAIN'); do
|
||||||
# Working on Web domain check - if is suspended
|
# Working on Web domain check - if is suspended
|
||||||
webSuspended=$(grep "DOMAIN='$domain'" $USER_DATA/web.conf |grep "SUSPENDED='yes")
|
webSuspended=$(grep "DOMAIN='$domain'" $USER_DATA/web.conf |grep "SUSPENDED='yes")
|
||||||
|
@ -46,6 +47,10 @@ for user in $users; do
|
||||||
expire=$((expire / 86400))
|
expire=$((expire / 86400))
|
||||||
domain=$(basename $crt |sed -e "s/.crt$//")
|
domain=$(basename $crt |sed -e "s/.crt$//")
|
||||||
if [[ "$expire" -lt 31 ]]; then
|
if [[ "$expire" -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")
|
||||||
|
@ -62,10 +67,6 @@ for user in $users; do
|
||||||
echo "$domain $msg"
|
echo "$domain $msg"
|
||||||
fi
|
fi
|
||||||
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