Permalink
Browse files

Better handling of calm-down routine while LE renewing

Sleep is because #1193
  • Loading branch information...
dpeca committed Dec 10, 2018
1 parent 58c6ca9 commit 3d8b6a87a77ae8c026e90eb45212349585adc5e3
Showing with 6 additions and 5 deletions.
  1. +6 −5 bin/v-update-letsencrypt-ssl
@@ -25,11 +25,12 @@ source $VESTA/conf/vesta.conf
# Defining user list
users=$($BIN/v-list-users | tail -n+3 | awk '{ print $1 }')

lecounter=0

# Checking users
for user in $users; do
USER_DATA=$VESTA/data/users/$user
# Checking user certificates
lecounter=0
for domain in $(search_objects 'web' 'LETSENCRYPT' 'yes' 'DOMAIN'); do
# Working on Web domain check - if is suspended
webSuspended=$(grep "DOMAIN='$domain'" $USER_DATA/web.conf |grep "SUSPENDED='yes")
@@ -46,6 +47,10 @@ for user in $users; do
expire=$((expire / 86400))
domain=$(basename $crt |sed -e "s/.crt$//")
if [[ "$expire" -lt 31 ]]; then
if [ $lecounter -gt 0 ]; then
sleep 10
fi
((lecounter++))
aliases=$(echo "$crt_data" |grep DNS:)
aliases=$(echo "$aliases" |sed -e "s/DNS://g" -e "s/,//")
aliases=$(echo "$aliases" |tr ' ' '\n' |sed "/^$/d")
@@ -62,10 +67,6 @@ for user in $users; do
echo "$domain $msg"
fi
fi
if [ $lecounter -gt 0 ]; then
sleep 10
fi
((lecounter++))
fi
done
done

0 comments on commit 3d8b6a8

Please sign in to comment.