This script lists all domains and subdomains in a Let's Encrypt certificate file.
This script expands your current certificate with new subdomains.
Created by Fábio (https://mestrefabio.com).
-
Download the script.
-
Make the scripts executable:
chmod +x certbot-domains
chmod +x certbot-expand
- Copy the scripts to one of your PATH directories, for example:
sudo cp certbot-domains /usr/local/bin
sudo cp certbot-expand /usr/local/bin
Run the script by passing the domain or folder as a parameter (/etc/letsencrypt/live/[domain or folder]
):
sudo certbot-domains mydomain.com
The script will list all your domains and subdomains:
mydomain.com
mail.mydomain.com
www.mydomain.com
dev.mydomain.com
Run the script by passing the domain or folder as a parameter, and subsequent subdomains.
sudo certbot-expand mydomain.com www.mydomain.com mail.mydomain.com ...
Note: You need sudo
permissions to access the Let's Encrypt local folder.