mirror of https://github.com/CISOfy/lynis.git
Merge pull request #973 from igloonet/fix/functions-parse-nginx-abs-path
Support absolute paths in nginx includes and fix ls warning on empty directories
This commit is contained in:
commit
92df49d08e
|
@ -2305,7 +2305,8 @@
|
||||||
# Check for additional config files included as follows
|
# Check for additional config files included as follows
|
||||||
# "include sites-enabled/*.conf"
|
# "include sites-enabled/*.conf"
|
||||||
elif [ $(echo ${VALUE} | grep -F -c "*.conf") -gt 0 ]; then
|
elif [ $(echo ${VALUE} | grep -F -c "*.conf") -gt 0 ]; then
|
||||||
for FOUND_CONF in $(ls ${CONFIG_FILE%nginx.conf}${VALUE%;*}); do
|
if [ "$(echo ${VALUE} | ${CUTBINARY} -c1)" != "/" ]; then VALUE=${CONFIG_FILE%nginx.conf}; fi
|
||||||
|
for FOUND_CONF in $(ls ${VALUE%;*} 2> /dev/null); do
|
||||||
FOUND=0
|
FOUND=0
|
||||||
for CONF in ${NGINX_CONF_FILES}; do
|
for CONF in ${NGINX_CONF_FILES}; do
|
||||||
if [ "${CONF}" = "${FOUND_CONF}" ]; then FOUND=1; LogText "Found this file already in our configuration files array, not adding to queue"; fi
|
if [ "${CONF}" = "${FOUND_CONF}" ]; then FOUND=1; LogText "Found this file already in our configuration files array, not adding to queue"; fi
|
||||||
|
|
Loading…
Reference in New Issue