Created
April 23, 2016 02:01
-
-
Save danrossi/ee15e1ba84ba8b203bb18fba5cb876fb to your computer and use it in GitHub Desktop.
Lets Encrypt Renew Script For Nginx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
service nginx stop # or whatever your webserver is | |
letsencrypt renew -nvv --standalone > /var/log/letsencrypt/renew.log 2>&1 | |
LE_STATUS=$? | |
service nginx start # or whatever your webserver is | |
if [ "$LE_STATUS" != 0 ]; then | |
echo Automated renewal failed: | |
cat /var/log/letsencrypt/renew.log | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Schedule like
0 0 1 * * /path/scripts/renew.sh > /dev/null 2>&1
0 0 1 */4 * /path/scripts/renew_cloudfront_cert.sh 2>&1