Skip to content

Instantly share code, notes, and snippets.

@zaskem
Created October 4, 2020 18:33
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Basic Certbot bash automation script to bolt together key commands in manually-requesting a certificate for multiple variations (TLDs) of a domain, as outlined in https://mzonline.com/blog/2020-10/improving-manual-certbot-domain-validation
#!/bin/bash
certbot certonly --manual --manual-public-ip-logging-ok -d superdomain.net -d www.superdomain.net
read -n1 -r -s -p "Press any key to load certificate...`echo $'\r\n\r\n'`"
more /etc/letsencrypt/live/superdomain.net/cert.pem
read -n1 -r -s -p "Press any key to load private key...`echo $'\r\n\r\n'`"
more /etc/letsencrypt/live/superdomain.net/privkey.pem
read -n1 -r -s -p "Press any key to begin renewal process for superdomain.com...`echo $'\r\n\r\n'`"
certbot certonly --manual --manual-public-ip-logging-ok -d superdomain.com -d www.superdomain.com
read -n1 -r -s -p "Press any key to load certificate...`echo $'\r\n\r\n'`"
more /etc/letsencrypt/live/superdomain.com/cert.pem
read -n1 -r -s -p "Press any key to load private key...`echo $'\r\n\r\n'`"
more /etc/letsencrypt/live/superdomain.com/privkey.pem
read -n1 -r -s -p "Press any key to end certificate renewal process...`echo $'\r\n\r\n'`"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment