Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Letsencrypt update certs using webroot
#!/bin/bash
DOMAINS=example.net
WEBROOT=/var/www/html
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
certbot certonly --webroot --webroot-path "$WEBROOT" --register-unsafely-without-email -d "$DOMAINS"
iptables -D INPUT -p tcp --dport 80 -j ACCEPT
apache2ctl graceful
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.