Skip to content

Commit 9ef90f7

Browse files
authored
Merge pull request #3 from 2sheds/multihost
Use first of multi-host domains for certificate names
2 parents 12646ec + 8915bde commit 9ef90f7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/run_certbot.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ issueCertificate() {
3131
}
3232

3333
copyCertificate() {
34-
local d=${CERT_DOMAIN} # shorthand
34+
local d=${CERT_DOMAIN%%,*} # in case of multi-host domains, use first name only
3535

3636
# certs are copied to /certs directory
3737
if [ "$CONCAT" = true ]; then
@@ -57,7 +57,7 @@ processCertificates() {
5757
# - CONCAT
5858
# - CERTBOT_ARGS
5959

60-
local d=${CERT_DOMAIN} # shorthand
60+
local d=${CERT_DOMAIN%%,*} # in case of multi-host domains, use first name only
6161

6262
if [ -d /etc/letsencrypt/live/$d ]; then
6363
cert_path=$(find /etc/letsencrypt/live/$d -name cert.pem -print0)

0 commit comments

Comments
 (0)