Created
November 7, 2011 19:43
-
-
Save dnoseda/1345932 to your computer and use it in GitHub Desktop.
startup jenkins
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 | |
## Check if process is already running | |
echo "Looking for jenkins" | |
pid=`ps aux | grep jenkins.war | grep -v grep | awk '{print $2}'` | |
echo "PID: $pid" | |
if [ "$pid" == "" ] | |
then | |
echo "Starting Jenkins..." | |
export JENKINS_HOME="/jenkins" | |
export JAVA_OPTS="-Dhttp.proxyHost=172.16.0.89 -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts=*.ml.com|internal.ml.com|10.100.34.*|localhost" | |
### DEFINIR EL SUBDOMINIO QUE VA A TENER EL JENKINS Y AGREGARLO AL --prefix. ### | |
### EJ.: --prefix=/orders para jenkins.ml.com/orders/ ### | |
nohup java -jar /usr/local/bin/jenkins/jenkins.war --httpPort=9300 --prefix=/shipping > /usr/local/log/app.log & | |
else | |
echo "Jenkins is already running" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment