Skip to content

Commit

Permalink
Update certbot run-certbot.sh to allow it work with multiple domains
Browse files Browse the repository at this point in the history
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
  • Loading branch information
lakhbawa authored Sep 29, 2020
1 parent f6c53ce commit 119a2a3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions certbot/run-certbot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

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"/privkey1.pem /var/certs/privkey1.pem
cp /etc/letsencrypt/archive/"$CN"/cert1.pem /var/certs/"$CN"-cert1.pem
cp /etc/letsencrypt/archive/"$CN"/privkey1.pem /var/certs/"$CN"-privkey1.pem

0 comments on commit 119a2a3

Please sign in to comment.