Skip to content

Instantly share code, notes, and snippets.

@mattpatterson94
Created February 4, 2018 23:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattpatterson94/c174f1db9a7f80ac3759c3806a00a005 to your computer and use it in GitHub Desktop.
Save mattpatterson94/c174f1db9a7f80ac3759c3806a00a005 to your computer and use it in GitHub Desktop.
Certbot CRON

CERTBOT RENEW CERTIFICATE CRON

#dev/server #dev/snippets

touch cron_log.log
touch renew-certs
chmod 777 renew-certs

Crontab

crontab -e

0 4 * * * /root/renew-certs;

renew-certs

#!/bin/bash

certbot renew --renew-hook="service nginx restart" >> /root/cron_log.log;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment