Last active
February 28, 2017 08:38
-
-
Save sparsick/b9a6052dd9c202a09f6480e75e41ee8a to your computer and use it in GitHub Desktop.
Jenkins Startscript
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 JENKINS_HOME=/path/to/your/jenkins/installation | |
export HTTP_PORT=8001 | |
export AJP_PORT=8002 | |
export CONTROL_PORT=8003 | |
case "$1" in | |
start) | |
nohup java -Djava.awt.headless=true -jar $JENKINS_HOME/jenkins.war --httpPort=$HTTP_PORT --controlPort=$CONTROL_PORT > $JENKINS_HOME/jenkins.log 2>&1 & | |
;; | |
stop) | |
java -cp $JENKINS_HOME/war/winstone.jar winstone.tools.WinstoneControl shutdown --host=localhost --port=$CONTROL_PORT | |
;; | |
restart) | |
java -cp $JENKINS_HOME/war/winstone.jar winstone.tools.WinstoneControl reload --host=localhost --port=$CONTROL_PORT | |
;; | |
*) | |
echo "usage: jenkins.sh | |
$0 start | stop | restart" | |
exit 1 | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment