Skip to content

Commit f5de3b2

Browse files
committed
Adjust if condition to use nginx for acme validation if present.
1 parent a72d222 commit f5de3b2

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file.
99
### Bugfixes
1010
- Add a detection of web root for add .well-known acme challenge.
1111
- Rework Let's Encrypt acme staging to use hestia conform standard.
12+
- Fix if condition, use nginx for Let's Encrypt acme request if present.
1213

1314
## [1.0.4] - 2019-07-09 - Hotfix
1415
### Bugfixes

bin/v-add-letsencrypt-domain

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -228,15 +228,9 @@ for auth in $authz; do
228228
check_result $? "DNS _acme-challenge record wasn't created"
229229
else
230230
if [ -z "$mail" ]; then
231-
if [ "$WEB_SYSTEM" = 'nginx' ] && [ ! -z "$PROXY_SYSTEM" ]; then
232-
if [ ! -z "$mail" ]; then
233-
conf="$HOMEDIR/$user/conf/mail/$root_domain/$PROXY_SYSTEM.conf_letsencrypt"
234-
sconf="$HOMEDIR/$user/conf/mail/$root_domain/$PROXY_SYSTEM.ssl.conf_letsencrypt"
235-
else
236-
conf="$HOMEDIR/$user/conf/web/$domain/$PROXY_SYSTEM.conf_letsencrypt"
237-
sconf="$HOMEDIR/$user/conf/web/$domain/$PROXY_SYSTEM.ssl.conf_letsencrypt"
238-
fi
239-
231+
if [ "$WEB_SYSTEM" = 'nginx' ] || [ "$PROXY_SYSTEM" = 'nginx' ]; then
232+
conf="$HOMEDIR/$user/conf/web/$domain/nginx.conf_letsencrypt"
233+
sconf="$HOMEDIR/$user/conf/web/$domain/nginx.ssl.conf_letsencrypt"
240234
if [ ! -e "$conf" ]; then
241235
echo 'location ~ "^/\.well-known/acme-challenge/(.*)$" {' \
242236
> $conf
@@ -249,7 +243,6 @@ for auth in $authz; do
249243
fi
250244
$BIN/v-restart-proxy
251245
check_result $? "Proxy restart failed" > /dev/null
252-
253246
else
254247
# Get root directory from configuration
255248
domain_config="$HOMEDIR/$user/conf/web/$domain"

0 commit comments

Comments
 (0)