mirror of https://github.com/CISOfy/lynis.git
[TOOL-5002] performance enhancement to reduce number of dirs/files to check
This commit is contained in:
parent
0caf42bc51
commit
c0a6aaf855
|
@ -54,10 +54,13 @@
|
||||||
|
|
||||||
# Ansible
|
# Ansible
|
||||||
FOUND=0
|
FOUND=0
|
||||||
LIST="~/.ansible ~/.ansible-retry ${ROOTDIR}etc/ansible ${ROOTDIR}root/.ansible ${ROOTDIR}tmp/.ansible"
|
LIST="~/.ansible ${ROOTDIR}etc/ansible ${ROOTDIR}root/.ansible ${ROOTDIR}tmp/.ansible"
|
||||||
for ITEM in ${LIST}; do if DirectoryExists ${ITEM}; then FOUND=1; fi; done
|
for ITEM in ${LIST}; do if DirectoryExists ${ITEM}; then FOUND=1; break; fi; done
|
||||||
LIST="${ROOTDIR}var/log/ansible.log"
|
# Test for files (only if no match was found)
|
||||||
for ITEM in ${LIST}; do if FileExists ${ITEM}; then FOUND=1; fi; done
|
if [ ${FOUND} -eq 0 ]; then
|
||||||
|
LIST="${ROOTDIR}var/log/ansible.log ~/.ansible-retry"
|
||||||
|
for ITEM in ${LIST}; do if FileExists ${ITEM}; then FOUND=1; break; fi; done
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ${FOUND} -eq 1 ]; then
|
if [ ${FOUND} -eq 1 ]; then
|
||||||
LogText "Result: found a possible trace of Ansible"
|
LogText "Result: found a possible trace of Ansible"
|
||||||
|
|
Loading…
Reference in New Issue