From 8915bde21eb42bfe9f85ea0f42755d040d295f82 Mon Sep 17 00:00:00 2001 From: Oleg Kurapov Date: Wed, 27 Mar 2019 23:00:57 +0300 Subject: [PATCH] Fix for multi-host domains always being re-issued --- scripts/run_certbot.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/run_certbot.sh b/scripts/run_certbot.sh index 0ace6ed..c43f7f8 100755 --- a/scripts/run_certbot.sh +++ b/scripts/run_certbot.sh @@ -31,7 +31,7 @@ issueCertificate() { } copyCertificate() { - local d=${CERT_DOMAIN} # shorthand + local d=${CERT_DOMAIN%%,*} # in case of multi-host domains, use first name only # certs are copied to /certs directory if [ "$CONCAT" = true ]; then @@ -57,7 +57,7 @@ processCertificates() { # - CONCAT # - CERTBOT_ARGS - local d=${CERT_DOMAIN} # shorthand + local d=${CERT_DOMAIN%%,*} # in case of multi-host domains, use first name only if [ -d /etc/letsencrypt/live/$d ]; then cert_path=$(find /etc/letsencrypt/live/$d -name cert.pem -print0)