Author: jfrederic.clere(a)jboss.com
Date: 2008-09-19 04:30:21 -0400 (Fri, 19 Sep 2008)
New Revision: 1869
Added:
trunk/mod_cluster/test/java/installhttpd.sh
Log:
Script to modify the mod_cluster bundle to run with the tests.
Added: trunk/mod_cluster/test/java/installhttpd.sh
===================================================================
--- trunk/mod_cluster/test/java/installhttpd.sh (rev 0)
+++ trunk/mod_cluster/test/java/installhttpd.sh 2008-09-19 08:30:21 UTC (rev 1869)
@@ -0,0 +1,45 @@
+#!/bin/sh
+#
+# Script to install httpd in $HOME and configure it for mod_cluster tests.
+files="opt/jboss/httpd/sbin/apachectl opt/jboss/httpd/httpd/conf/httpd.conf
/opt/jboss/httpd/sbin/envvars"
+for FILE in `echo $files`
+do
+ file=${HOME}/$FILE
+ echo "$file"
+ cp -p $file $file.new
+ sed "s:opt/jboss/httpd:${HOME}/opt/jboss/httpd:" $file > $file.new
+ mv $file $file.`date +%y%m%d.%H%M%S`.org
+ mv $file.new $file
+done
+# Arrange apachectl
+file=$HOME/opt/jboss/httpd/sbin/apachectl
+cp -p $file $file.new
+echo "s:\$HTTPD -k \$ARGV:\$HTTPD -k \$ARGV -d ${HOME}/opt/jboss/httpd/httpd:"
> sed.cmd
+sed -f sed.cmd $file > $file.new
+mv $file $file.`date +%y%m%d.%H%M%S`.1.org
+mv $file.new $file
+
+# Arrange httpd.conf
+file=$HOME/opt/jboss/httpd/httpd/conf/httpd.conf
+cp -p $file $file.new
+echo "s:Listen 80:Listen 8000:" > sed.cmd
+sed -f sed.cmd $file > $file.new
+cat >> $file.new <<EOF
+<IfModule manager_module>
+ Listen file:6666
+ ManagerBalancerName mycluster
+ <VirtualHost file:6666>
+ <Directory />
+ Order deny,allow
+ Deny from all
+ allow from 10.33.144
+ </Directory>
+
+ KeepAliveTimeout 300
+ MaxKeepAliveRequests 0
+ AdvertiseFrequency 5
+ </VirtualHost>
+</IfModule>
+EOF
+mv $file $file.`date +%y%m%d.%H%M%S`.1.org
+mv $file.new $file