mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-31 01:34:23 +02:00
Merge pull request #73 from laurentquillerou/nginx-conf
Include main nginx.conf file in parsing.
This commit is contained in:
commit
59390f1717
@ -422,6 +422,7 @@
|
|||||||
# Remove temp file
|
# Remove temp file
|
||||||
if [ ! "${TMPFILE}" = "" ]; then if [ -f ${TMPFILE} ]; then rm -f ${TMPFILE}; fi; fi
|
if [ ! "${TMPFILE}" = "" ]; then if [ -f ${TMPFILE} ]; then rm -f ${TMPFILE}; fi; fi
|
||||||
N=0
|
N=0
|
||||||
|
cat ${NGINX_CONF_LOCATION} | sed -e 's/^[ \t]*//' | grep -v "^#" | grep -v "^$" | sed 's/[\t]/ /g' | sed 's/ / /g' | sed 's/ / /g' >> ${TMPFILE}
|
||||||
# Search for included configuration files (may include directories and wild cards)
|
# Search for included configuration files (may include directories and wild cards)
|
||||||
FIND=`grep "include" ${NGINX_CONF_LOCATION} | ${AWKBINARY} '{ if ($1=="include") { print $2 }}' | sed 's/;$//g'`
|
FIND=`grep "include" ${NGINX_CONF_LOCATION} | ${AWKBINARY} '{ if ($1=="include") { print $2 }}' | sed 's/;$//g'`
|
||||||
for I in ${FIND}; do
|
for I in ${FIND}; do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user