From 119a2a36ed3712517963e087273a49f596dca01d Mon Sep 17 00:00:00 2001 From: Lakhveer Bawa <44654385+bawa93@users.noreply.github.com> Date: Tue, 29 Sep 2020 11:06:48 +0530 Subject: [PATCH] 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 --- certbot/run-certbot.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/certbot/run-certbot.sh b/certbot/run-certbot.sh index 26be75c..c66ba2c 100644 --- a/certbot/run-certbot.sh +++ b/certbot/run-certbot.sh @@ -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 +