Update certbot run-certbot.sh to allow it work with multiple domains

Previously, running docker-compose up -d certbot would overwrite the previous certificate stored in /var/certs

Now: the certificates will be stored with the filename containing domain name
This commit is contained in:
Lakhveer Bawa 2020-09-29 11:06:48 +05:30 committed by GitHub
parent f6c53ce538
commit 119a2a36ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -2,5 +2,6 @@
letsencrypt certonly --webroot -w /var/www/letsencrypt -d "$CN" --agree-tos --email "$EMAIL" --non-interactive --text letsencrypt certonly --webroot -w /var/www/letsencrypt -d "$CN" --agree-tos --email "$EMAIL" --non-interactive --text
cp /etc/letsencrypt/archive/"$CN"/cert1.pem /var/certs/cert1.pem cp /etc/letsencrypt/archive/"$CN"/cert1.pem /var/certs/"$CN"-cert1.pem
cp /etc/letsencrypt/archive/"$CN"/privkey1.pem /var/certs/privkey1.pem cp /etc/letsencrypt/archive/"$CN"/privkey1.pem /var/certs/"$CN"-privkey1.pem