Last active
November 30, 2016 18:17
-
-
Save vzool/1734ce81651cd1045b9804d2c1c8e117 to your computer and use it in GitHub Desktop.
Script to update and install Let's Encrypt Automatically using "certbot"
This file contains hidden or 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/bash | |
| certbot renew --standalone --pre-hook "systemctl stop httpd" --post-hook "systemctl start httpd" | |
| # Cron job by command(crontab -e) | |
| # ------------------------- | |
| # 0 */12 * * * /root/renew-cert.sh > /dev/null 2>&1 | |
| # Apache option | |
| # ------------------------- | |
| # SSLEngine on | |
| # SSLCertificateFile /etc/letsencrypt/live/xxx.yyy/cert.pem | |
| # SSLCertificateKeyFile /etc/letsencrypt/live/xxx.yyy/privkey.pem | |
| # SSLCertificateChainFile /etc/letsencrypt/live/xxx.yyy/fullchain.pem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment