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:
Rutger van Sleen 2016-08-30 20:03:38 +02:00 committed by GitHub
parent 4e139f4d71
commit 67b1abedfa
1 changed files with 1 additions and 1 deletions

View File

@ -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))