Skip to content

Instantly share code, notes, and snippets.

@kai101
Last active March 2, 2018 04:18
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 kai101/7048d7483defd1dbbdd63bb17a08d6f6 to your computer and use it in GitHub Desktop.
Save kai101/7048d7483defd1dbbdd63bb17a08d6f6 to your computer and use it in GitHub Desktop.
Fix certbot braking updates for early 2018

Install certbot

sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-nginx
sudo certbot --authenticator standalone --installer nginx -d www.example.com --pre-hook "service nginx stop;sleep 5;" --post-hook "service nginx start;sleep 5;"

Auto renew cronjob

#cronjob renew cert
0 23 * * 6 certbot renew  --pre-hook "service nginx stop;sleep 10;" --post-hook "service nginx start;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment