Skip to content

Commit d848b9f

Browse files
author
thomas
committed
完善nginx配置检测
1 parent 3fecf8c commit d848b9f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

httpsok.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ _initparams() {
162162
# again to verify
163163
$nginx_bin -V > /dev/null 2>&1
164164
if [ $? -ne 0 ]; then
165-
_no_nginx_here
165+
_no_nginx_here
166166
else
167167
echo "Nginx executable path: $nginx_bin"
168168
fi
@@ -444,12 +444,10 @@ __process_include() {
444444
#cmd = "ls -1 " $2 " 2>/dev/null | xargs -I GG awk '\'' BEGIN {print \"#included GG;\" } {print} '\'' GG "
445445
#cmd = "ls -1 " $2 " 2>/dev/null | xargs -I {} awk '\'' BEGIN {print \"#included {};\" } {print} '\'' {} "
446446
447-
448447
cmd = "ls -1 " $2 " 2>/dev/null | xargs -I {} awk '\'' BEGIN {print \"#included-begin {};\" } {print} END{ print \"#included-end {};\" } '\'' {} "
449448
450449
# print cmd
451450
system(cmd)
452-
453451
print ""
454452
455453
next
@@ -484,7 +482,7 @@ _preparse() {
484482

485483
config_text=$(cat $NGINX_CONFIG | __process_include | __process_format)
486484
# exit
487-
# config_text=$(grep -E "ssl|server_name|server|include|listen" -r "$NGINX_CONFIG_HOME" "/www/server/panel/vhost/nginx" "/usr/local/*/vhost/" "/home/wwwroot/*/vhost/" "/home/wwwroot/*/etc/" | cat | grep -v 'SERVER_')
485+
# config_text=$(grep -E "ssl|server_name|server|include|listen" -r "$NGINX_CONFIG_HOME" | cat | grep -v 'SERVER_')
488486
preparse=$(_post "/preparse" "$config_text")
489487
if [ "$preparse" = "" ]; then
490488
return 4

0 commit comments

Comments
 (0)