Strip out any comments at end of nginx configuration lines

This commit is contained in:
Michael Boelen 2017-01-27 14:36:55 +01:00
parent 6fdc46cae5
commit 670b18b6f5
1 changed files with 1 additions and 1 deletions

View File

@ -1636,7 +1636,7 @@
FIND=$(cat ${TMP_NGINX_FILE} | sed 's/ /:space:/g') FIND=$(cat ${TMP_NGINX_FILE} | sed 's/ /:space:/g')
DEPTH=0 DEPTH=0
for I in ${FIND}; do for I in ${FIND}; do
I=`echo ${I} | sed 's/:space:/ /g' | sed 's/;$//'` I=`echo ${I} | sed 's/:space:/ /g' | sed 's/;$//' | sed 's/ #.*$//'`
OPTION=`echo ${I} | awk '{ print $1 }'` OPTION=`echo ${I} | awk '{ print $1 }'`
VALUE=`echo ${I}| cut -d' ' -f2-` VALUE=`echo ${I}| cut -d' ' -f2-`
LogText "Result: found option ${OPTION} in ${CONFIG_FILE} with value '${VALUE}'" LogText "Result: found option ${OPTION} in ${CONFIG_FILE} with value '${VALUE}'"