mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-31 01:34:23 +02:00
Merge branch 'master' of https://github.com/CISOfy/Lynis
This commit is contained in:
commit
f551da1c99
@ -50,9 +50,13 @@
|
||||
# Test : HTTP-6622
|
||||
# Description : Test for Apache installation
|
||||
# Notes : Do not run on NetBSD, -v is unknown option for httpd binary
|
||||
# On OpenBSD do not run /usr/sbin/httpd with -v: builtin non-Apache
|
||||
if [ ! "${OS}" = "NetBSD" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
|
||||
Register --test-no HTTP-6622 --preqs-met ${PREQS_MET} --weight L --network NO --description "Checking Apache presence"
|
||||
if [ ${SKIPTEST} -eq 0 ]; then
|
||||
if [ "${OS}" = "OpenBSD" -a "${HTTPDBINARY}" = "/usr/sbin/httpd" ]; then
|
||||
HTTPDBINARY=""
|
||||
fi
|
||||
if [ "${HTTPDBINARY}" = "" ]; then
|
||||
Display --indent 2 --text "- Checking Apache" --result "NOT FOUND" --color WHITE
|
||||
else
|
||||
@ -418,6 +422,7 @@
|
||||
# Remove temp file
|
||||
if [ ! "${TMPFILE}" = "" ]; then if [ -f ${TMPFILE} ]; then rm -f ${TMPFILE}; fi; fi
|
||||
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)
|
||||
FIND=`grep "include" ${NGINX_CONF_LOCATION} | ${AWKBINARY} '{ if ($1=="include") { print $2 }}' | sed 's/;$//g'`
|
||||
for I in ${FIND}; do
|
||||
|
Loading…
x
Reference in New Issue
Block a user