mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-29 00:34:14 +02:00
Directories will be skipped when searching for nginx log files
This commit is contained in:
parent
b31a6c4659
commit
1f032c767f
@ -667,7 +667,7 @@
|
|||||||
logtext "Test: Checking ${I}"
|
logtext "Test: Checking ${I}"
|
||||||
if [ -d ${I} ]; then
|
if [ -d ${I} ]; then
|
||||||
logtext "Result: Directory ${I} exists, so will be used as search path"
|
logtext "Result: Directory ${I} exists, so will be used as search path"
|
||||||
FIND=`find ${I} -exec grep access_log \{\} \; | grep -v "#" | awk '{ if($1=="access_log") { print $2 } }' | sed 's/;$//g' | sort | uniq`
|
FIND=`find ${I} -type f -exec grep access_log \{\} \; | grep -v "#" | awk '{ if($1=="access_log") { print $2 } }' | sed 's/;$//g' | sort | uniq`
|
||||||
if [ "${FIND}" = "" ]; then
|
if [ "${FIND}" = "" ]; then
|
||||||
logtext "Result: no log files found"
|
logtext "Result: no log files found"
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user