Created
June 15, 2020 19:17
-
-
Save rrmhearts/aac45194b64109e03b20582f42c2efe8 to your computer and use it in GitHub Desktop.
Renew lighttpd server certs using letsencrypt
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/bash | |
sudo /usr/local/bin/certbot-auto renew | |
sudo cp /etc/letsencrypt/live/domain.com/* /etc/lighttpd/certs/ | |
cd /etc/lighttpd/certs | |
sudo cat privkey.pem cert.pem | sudo tee merged.pem | |
sudo systemctl restart lighttpd.service | |
## Renew every two months | |
# crontab -e | |
# 0 0 1 */2 * ~/cert-renew.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment