|
@ -2433,11 +2433,17 @@ _checkConf() { |
|
|
#d , conf |
|
|
#d , conf |
|
|
_isRealNginxConf() { |
|
|
_isRealNginxConf() { |
|
|
_debug "_isRealNginxConf $1 $2" |
|
|
_debug "_isRealNginxConf $1 $2" |
|
|
if [ -f "$2" ] && grep "^ *server_name " "$2" | grep " $1" >/dev/null; then |
|
|
|
|
|
|
|
|
if [ -f "$2" ]; then |
|
|
|
|
|
for _fln in $(grep -n "^ *server_name.* $1" "$2" | cut -d : -f 1); do |
|
|
|
|
|
_debug _fln "$_fln" |
|
|
|
|
|
if [ "$_fln" ]; then |
|
|
|
|
|
_listen=$(cat "$2" | _head_n "$_fln" | grep "^ *listen .*" | _tail_n 1) |
|
|
|
|
|
fi |
|
|
|
|
|
done |
|
|
return 0 |
|
|
return 0 |
|
|
else |
|
|
|
|
|
return 1 |
|
|
|
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
return 1 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
#restore all the nginx conf |
|
|
#restore all the nginx conf |
|
|