Last active
May 12, 2016 08:15
-
-
Save qianduan/fe210cc9bd1561db0b9a4bc469f034fe to your computer and use it in GitHub Desktop.
auto renew let's encrypt certificate
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 | |
/home/soft/letsencrypt.client/letsencrypt-auto 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