more flexible document_root retriver
authorMatteo Nastasi (mop) <nastasi@alternativeoutput.it>
Wed, 8 May 2013 05:44:34 +0000 (07:44 +0200)
committerMatteo Nastasi (mop) <nastasi@alternativeoutput.it>
Wed, 8 May 2013 05:44:34 +0000 (07:44 +0200)
INSTALL.sh

index 257d867..b021de5 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/bash
-set -x
+set -x
 #
 # Defaults
 #
@@ -367,7 +367,7 @@ sed -i "s@var \+cookiepath \+= \+\"[^\"]*\";@var cookiepath = \"$prefix_path\";@
 
 sed -i "s@\( \+cookiepath *: *\)\"[^\"]*\" *,@\1 \"$prefix_path\",@g" ${web_path}__/xynt-streaming.js
 
-document_root="$(grep DocumentRoot "${apache_conf}"  | grep -v '^#' | awk '{ print $2 }')"
+document_root="$(grep DocumentRoot "${apache_conf}"  | grep -v '^[     ]*#' | awk '{ print $2 }')"
 sed -i "s@^\(\$DOCUMENT_ROOT *= *[\"']\)[^\"']*\([\"']\)@\1$document_root\2@g" ${web_path}__/spush/*.ph*
 
 if [ -d ${web_path} ]; then