Skip to content

Instantly share code, notes, and snippets.

@yakatz
Created April 24, 2017 03:46
Show Gist options
  • Save yakatz/4cad3f2a71866675258eed582119e6c6 to your computer and use it in GitHub Desktop.
Save yakatz/4cad3f2a71866675258eed582119e6c6 to your computer and use it in GitHub Desktop.
Let's Encrypt Renewal Script
!/bin/bash
# Create the following CRON job
# 25 */12 * * * /usr/bin/certbot-auto renew --post-hook "/opt/reload-webservers.sh" --noninteractive
# You can change the minute time to a random value, but the job should run every 12 hours.
# Customize the list of services below that use Let's Encrypt certificates
/usr/sbin/service nginx reload
/usr/sbin/service apache2 reload
/usr/sbin/service webmin restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment