let's encrypt 可以在 crontab 里面设置每月自动更新,不用手动再申请
https://github.com/diafygi/acme-tinyStep 6: Setup an auto-renew cronjob
Congrats! Your website is now using https! Unfortunately, Let's Encrypt certificates only last for 90 days, so you need to renew them often. No worries! It's automated! Just make a bash script and add it to your crontab (see below for example script).
Example of a
renew_cert.sh:
```
#!/usr/bin/sh
python /path/to/
acme_tiny.py --account-key /path/to/account.key --csr /path/to/domain.csr --acme-dir /var/www/challenges/ > /tmp/signed.crt || exit
wget -O -
https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem > intermediate.pem
cat /tmp/signed.crt intermediate.pem > /path/to/chained.pem
service nginx reload
```
```
#example line in your crontab (runs once per month)
0 0 1 * * /path/to/
renew_cert.sh 2>> /var/log/acme_tiny.log
```