Skip to content

Instantly share code, notes, and snippets.

@ceberous
Last active June 1, 2019 22:20
Show Gist options
  • Select an option

  • Save ceberous/abc7167b3019688ecaf4812f0c9b349a to your computer and use it in GitHub Desktop.

Select an option

Save ceberous/abc7167b3019688ecaf4812f0c9b349a to your computer and use it in GitHub Desktop.
Lets Encrypt Auto Renew
#!/bin/bash
ufw disable
pkill letsencrypt,certbot
find / -type f -name ".certbot.lock"
find / -type f -name ".certbot.lock" -exec rm {} \;
/opt/letsencrypt/certbot-auto renew >> /var/log/letsencrypt-renewal.log
/bin/systemctl reload nginx
/usr/bin/certbot renew --nginx
ufw enable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment