From 05e7c958297600b7877344592e88827b1b837452 Mon Sep 17 00:00:00 2001 From: Marcel Hofer Date: Sun, 20 Oct 2019 17:02:54 +0200 Subject: [PATCH] [SSL] fix wildcard compare for non-bash shell --- data/conf/nginx/templates/sites.template.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/data/conf/nginx/templates/sites.template.sh b/data/conf/nginx/templates/sites.template.sh index 51d24ee7..b2ca6f81 100644 --- a/data/conf/nginx/templates/sites.template.sh +++ b/data/conf/nginx/templates/sites.template.sh @@ -18,9 +18,10 @@ for cert_dir in /etc/ssl/mail/*/ ; do fi # do not create vhost for default-certificate. the cert is already in the default server listen domains="$(cat ${cert_dir}domains | sed -e 's/^[[:space:]]*//')" - if [[ "${domains}" == "" ]] || [[ "${domains}" == "${MAILCOW_HOSTNAME}"* ]]; then - continue - fi + case "${domains}" in + "") continue;; + "${MAILCOW_HOSTNAME}"*) continue;; + esac echo -n ' server { include /etc/nginx/conf.d/listen_plain.active;