Created
August 8, 2012 03:42
-
-
Save lakemove/3291856 to your computer and use it in GitHub Desktop.
script to bootstrap hudson in tomcat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
export JAVA_HOME=/usr/lib/jvm/jdk1.6.0_25 | |
export CATALINA_HOME=/usr/lib/apache-tomcat-7.0.26 | |
export CATALINA_BASE=/srv/hudson-ci | |
export HUDSON_HOME=/srv/hudson-ci/hudson-home | |
export PATH=$JAVA_HOME/bin:$PATH | |
# see http://stackoverflow.com/questions/76327/how-can-i-prevent-java-from-creating-hsperfdata-files | |
# to disable it , use "-XX:-UsePerfData" , | |
export JAVA_OPTS=" -XX:-UsePerfData $JAVA_OPTS" | |
#debug JVM | |
#export JAVA_OPTS=" -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n -XX:UsePerfData $JAVA_OPTS " | |
export JAVA_OPTS=" -Xmx512m $JAVA_OPTS " | |
me=`whoami` | |
if [ $me != "hudson" ]; then | |
echo "only user 'hudson' allowed to use this program, not '$me'" | |
exit 0 | |
fi | |
$CATALINA_HOME/bin/catalina.sh $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment