Created
June 11, 2018 13:54
-
-
Save selivan/af762d34504e27d56829e3602739d592 to your computer and use it in GitHub Desktop.
Letsencrypt update certs using webroot
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
#!/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