From 82a6e6ce0f1940d988a2ca77e874f4a654c44a9b Mon Sep 17 00:00:00 2001 From: MrThanlon Date: Fri, 27 Aug 2021 18:33:23 +0800 Subject: [PATCH] fix nginx mode The plus symbol (+) is not standard regular expressions, use extended regular expressions(`grep -E`) instead. --- acme.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/acme.sh b/acme.sh index 0c4928f5..d137c6c0 100755 --- a/acme.sh +++ b/acme.sh @@ -3163,9 +3163,9 @@ _checkConf() { FOUND_REAL_NGINX_CONF="$2" return 0 fi - if cat "$2" | tr "\t" " " | grep "^ *include *.*;" >/dev/null; then + if cat "$2" | tr "\t" " " | grep -E "^ *include +.*;" >/dev/null; then _debug "Try include files" - for included in $(cat "$2" | tr "\t" " " | grep "^ *include *.*;" | sed "s/include //" | tr -d " ;"); do + 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")"