-
-
Save swipswaps/7ebfca2114a0aa0b58aff83eac0f91cf to your computer and use it in GitHub Desktop.
Simple Certbot (Let's Encrypt) script for auto-renewal certificates
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
# Put this file in folder /etc/cron.d/ | |
MAILTO="debug@example.com" | |
0 1 * * * root /usr/local/sbin/certbot-renew.sh |
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 | |
# | |
# Supposing you have /etc/letsencrypt/cli.ini config file with domains | |
# | |
# Put this script in a daily cron and your cert will be automagically updated 30 days before expiration. | |
# If renew doesn't succeed, you'll receive email notification from your CA. | |
# | |
# https://certbot.eff.org/docs/using.html#renewal | |
# | |
sudo certbot-auto renew --noninteractive --post-hook "service apache2 reload" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment