Browse Source

Use random sleep again

As we now run the same part multiple times, sleep randomly in each loop
cycle. To be a bit nice to servers and letsencrypt.
master
Jonathan Golder 7 years ago
parent
commit
c0e3440f1d
  1. 2
      letsencrypt-renew.sh

2
letsencrypt-renew.sh

@ -8,7 +8,7 @@ for inifile in cli-*.ini; do
domain=${inifile:4:-4}
# sleep for a random time so not all certificates get renewed at the same time
sleep 473
sleep $(expr $RANDOM % 600)
# Check validity of cert for domain
openssl x509 -checkend $(( 21 * 86400 )) -in ~/.config/letsencrypt/live/${domain}/cert.pem > /dev/null

Loading…
Cancel
Save