Skip to content

Commit 62f96e3

Browse files
author
Kristan Kenney
committed
Merge branch 'le-ssl-fixes' into mail-file-fixes
2 parents 01293af + f4ebda4 commit 62f96e3

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

bin/v-add-letsencrypt-domain

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
user=$1
1414
domain=$2
1515
aliases=$3
16-
mail=$3
16+
mail=$4
1717

1818
# LE API
1919
LE_API='https://acme-v02.api.letsencrypt.org'
@@ -86,7 +86,7 @@ fi
8686
# Rework domain and alieses for mail.
8787
if [ ! -z "$mail" ]; then
8888
original_domain=$domain
89-
aliases="webmail.$domain,autodiscover.$domain"
89+
aliases="webmail.$original_domain,autodiscover.$original_domain"
9090
domain="mail.$domain"
9191
fi
9292

@@ -163,8 +163,14 @@ for auth in $authz; do
163163
check_result $? "DNS _acme-challenge record wasn't created"
164164
else
165165
if [ "$WEB_SYSTEM" = 'nginx' ] || [ ! -z "$PROXY_SYSTEM" ]; then
166-
conf="$HOMEDIR/$user/conf/web/$domain/$PROXY_SYSTEM.conf_letsencrypt"
167-
sconf="$HOMEDIR/$user/conf/web/$domain/$PROXY_SYSTEM.conf_letsencrypt"
166+
if [ -z "$mail" ]; then
167+
conf="$HOMEDIR/$user/conf/web/$domain/$PROXY_SYSTEM.conf_letsencrypt"
168+
sconf="$HOMEDIR/$user/conf/web/$domain/$PROXY_SYSTEM.ssl.conf_letsencrypt"
169+
else
170+
conf="$HOMEDIR/$user/conf/web/$original_domain/$PROXY_SYSTEM.conf_letsencryptmail"
171+
sconf="$HOMEDIR/$user/conf/web/$original_domain/$PROXY_SYSTEM.ssl.conf_letsencryptmail"
172+
fi
173+
168174
if [ ! -e "$conf" ]; then
169175
echo 'location ~ "^/\.well-known/acme-challenge/(.*)$" {' \
170176
> $conf

install/upgrade/0.9.8-29.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,10 @@ if [ -f /etc/dovecot/dovecot.conf ]; then
188188
fi
189189

190190
# Update Roundcube webmail configuration
191-
if [ -f /etc/apache2/conf.d/roundcube.conf ]; then
191+
if [ "$WEB_SYSTEM" = 'apache2' ]; then
192192
echo "(*) Updating Roundcube global subdomain configuration for apache2..."
193193
cp -f $HESTIA/install/deb/roundcube/apache.conf /etc/apache2/conf.d/roundcube.conf
194194
fi
195-
196195
if [ ! -z "$PROXY_SYSTEM" ]; then
197196
echo "(*) Updating Roundcube global subdomain configuration for nginx..."
198197
if [ -f /etc/nginx/conf.d/webmail.inc ]; then

0 commit comments

Comments
 (0)