From 5260ea281334225d45d327ea85204654d10725a5 Mon Sep 17 00:00:00 2001 From: Ben Ma Date: Thu, 21 Nov 2019 01:21:38 +0800 Subject: [PATCH] fixing nginx wildcard includes with relative path --- acme.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/acme.sh b/acme.sh index 2459404a..a2015503 100755 --- a/acme.sh +++ b/acme.sh @@ -3059,10 +3059,15 @@ _setNginx() { _start_f="$NGINX_CONF" fi _debug "Start detect nginx conf for $_d from:$_start_f" + if ! pushd $(dirname $_start_f) > /dev/null; then + _err "Can not chdir to nginx conf folder $(dirname $_start_f)" + return 1 + fi if ! _checkConf "$_d" "$_start_f"; then _err "Can not find conf file for domain $d" return 1 fi + popd > /dev/null _info "Found conf file: $FOUND_REAL_NGINX_CONF" _ln=$FOUND_REAL_NGINX_CONF_LN