瀏覽代碼

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
Lakhveer Bawa 4 年之前
父節點
當前提交
119a2a36ed
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      certbot/run-certbot.sh

+ 3 - 2
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
+