mirror of https://github.com/CISOfy/lynis.git
Fix sed syntax for ServerAlias removal
When a Apache config directive is in use, it has whitespace(s) or nothing at all prepended. Assuming that it always has a space before it doesn't have to match.
This commit is contained in:
parent
4e139f4d71
commit
67b1abedfa
|
@ -156,7 +156,7 @@
|
|||
fi
|
||||
done
|
||||
# Search Server aliases
|
||||
for J in `${GREPBINARY} "ServerAlias" ${I} | ${GREPBINARY} -v "^#" | sed "s/.* ServerAlias//g" | sed "s/#.*//g"`; do
|
||||
for J in `${GREPBINARY} "ServerAlias" ${I} | ${GREPBINARY} -v "^#" | sed "s/\s*ServerAlias //g" | sed "s/#.*//g"`; do
|
||||
if [ ! -z ${J} ]; then
|
||||
tVHOSTS="${tVHOSTS} ${J}"
|
||||
cVHOSTS=$((cVHOSTS + 1))
|
||||
|
|
Loading…
Reference in New Issue