mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-28 16:24:13 +02:00
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
|
fi
|
||||||
done
|
done
|
||||||
# Search Server aliases
|
# 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
|
if [ ! -z ${J} ]; then
|
||||||
tVHOSTS="${tVHOSTS} ${J}"
|
tVHOSTS="${tVHOSTS} ${J}"
|
||||||
cVHOSTS=$((cVHOSTS + 1))
|
cVHOSTS=$((cVHOSTS + 1))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user