Last active
December 3, 2018 00:37
-
-
Save mysticaltech/4adea4c15a2b1147f0be49ea7ff41b92 to your computer and use it in GitHub Desktop.
Automatically renew Certbot certificate using cron
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
sudo crontab -e | |
# And copy paste: | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment