git » chasquid » commit 359d45a

docker: Fix using a domain directory path as a domain name

author Ernesto Alfonso
2023-10-26 23:47:32 UTC
committer Alberto Bertogli
2023-10-27 09:48:34 UTC
parent 27fd7e722019121d1aa3c860bb2cdd92d725c648

docker: Fix using a domain directory path as a domain name

There is a bug causing an invalid config in the generated
/etc/dovecot/auto-ssl.conf, e.g.:

ssl_cert = </etc/letsencrypt/live//etc/letsencrypt/live/mail.grouplok.com/fullchain.pem
ssl_key = </etc/letsencrypt/live//etc/letsencrypt/live/mail.grouplok.com/privkey.pem

This patch fixes it by using the domain name instead of the path, which
matches the original intent.

https://github.com/albertito/chasquid/pull/42

Amended-by: Alberto Bertogli <albertito@blitiri.com.ar>
  Minor edits to the commit message.

docker/entrypoint.sh +1 -1

diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh
index 7093000..5302169 100755
--- a/docker/entrypoint.sh
+++ b/docker/entrypoint.sh
@@ -62,7 +62,7 @@ for i in /etc/letsencrypt/live/*; do
 done
 
 # We need one domain to use as a default - pick the last one.
-ONE_DOMAIN=$i
+ONE_DOMAIN=$D
 
 # Check that there's at least once certificate at this point.
 if [ "$CERT_DOMAINS" == "" ]; then