]> git.proxmox.com Git - mirror_acme.sh.git/commitdiff
fix nginx relative path issue:
authorneil <win10@neilpang.com>
Mon, 3 May 2021 09:11:02 +0000 (17:11 +0800)
committerneil <win10@neilpang.com>
Mon, 3 May 2021 09:11:02 +0000 (17:11 +0800)
https://github.com/acmesh-official/acme.sh/issues/1743
https://github.com/acmesh-official/acme.sh/issues/1914

acme.sh

diff --git a/acme.sh b/acme.sh
index d7ec50b428be39f4bc8bda4e31c290ad0ffce9fb..36e33c7b46b87271e66344961f09d93af0755302 100755 (executable)
--- a/acme.sh
+++ b/acme.sh
@@ -3098,6 +3098,11 @@ _checkConf() {
       _debug "Try include files"
       for included in $(cat "$2" | tr "\t" " " | grep "^ *include *.*;" | sed "s/include //" | tr -d " ;"); do
         _debug "check included $included"
+        if !_startswith "$included" "/" && _exists dirname; then
+          _relpath="$(dirname "$_c_file")"
+          _debug "_relpath" "$_relpath"
+          included="$_relpath/included"
+        fi
         if _checkConf "$1" "$included"; then
           return 0
         fi