From 67b1abedfa90603676081ab46c9d5b127c5713f5 Mon Sep 17 00:00:00 2001 From: Rutger van Sleen Date: Tue, 30 Aug 2016 20:03:38 +0200 Subject: [PATCH] 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. --- include/tests_webservers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/tests_webservers b/include/tests_webservers index 72972bf9..909b8a93 100644 --- a/include/tests_webservers +++ b/include/tests_webservers @@ -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))