Created
February 24, 2012 03:24
-
-
Save mogeta/1897104 to your computer and use it in GitHub Desktop.
example sh for jenkins on mac
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 | |
# | |
# Startup script used by Jenkins launchd job. | |
# Mac OS X launchd process calls this script to customize | |
# the java process command line used to run Jenkins. | |
# | |
# Customizable parameters are found in | |
# /Library/Preferences/org.jenkins-ci.plist | |
# | |
# You can manipulate it using the "defaults" utility. | |
# See "man defaults" for details. | |
defaults="defaults read /Library/Preferences/org.jenkins-ci" | |
war=`$defaults war` || war="/Applications/Jenkins/jenkins.war" | |
javaArgs="-Dfile.encoding=UTF-8" | |
heapSize=`$defaults heapSize` && javaArgs="$javaArgs -Xmx${heapSize}" | |
home=`$defaults JENKINS_HOME` && export JENKINS_HOME="$home" | |
add_to_args() { | |
val=`$defaults $1` && args="$args --${1}=${val}" | |
} | |
args="" | |
add_to_args prefix | |
add_to_args httpPort | |
add_to_args 8090 | |
#add_to_args httpListenAddress | |
add_to_args httpsPort | |
add_to_args httpsListenAddress | |
add_to_args ajp13Port | |
add_to_args ajp13ListenAddress | |
echo "JENKINS_HOME=$JENKINS_HOME" | |
echo "Jenkins command line for execution:" | |
echo /usr/bin/java $javaArgs -jar "$war" $args | |
exec /usr/bin/java $javaArgs -jar "$war" $args |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment