Skip to content

Instantly share code, notes, and snippets.

@arnissolle
Forked from wintermeyer/certbot
Created September 3, 2018 09:04
Show Gist options
  • Select an option

  • Save arnissolle/239a432ce4891c2db29ffdadcc641ff3 to your computer and use it in GitHub Desktop.

Select an option

Save arnissolle/239a432ce4891c2db29ffdadcc641ff3 to your computer and use it in GitHub Desktop.
certbot -q renew --deploy-hook "service nginx reload"
# /etc/cron.d/certbot: crontab entries for the certbot package
#
# Upstream recommends attempting renewal twice a day
#
# Eventually, this will be an opportunity to validate certificates
# haven't been revoked, etc. Renewal will only occur if expiration
# is within 30 days.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
0 */12 * * * root test -x /usr/bin/certbot -a \! -d /run/systemd/system && perl -e 'sleep int(rand(3600))' && certbot -q renew --deploy-hook "service nginx reload"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment