Sha256: a3c0df1514f6b2b2b0726e268a6e00b36926e825ec844e40c2fd0cb5d8f79303
Contents?: true
Size: 1.58 KB
Versions: 37
Compression:
Stored size: 1.58 KB
Contents
#! /bin/bash # # hudson Start/Stop the Hudson Continuous Integration server. # # chkconfig: 345 91 10 # description: Hudson is a Continuous Integration server. \ # It monitors a source code repository and triggers builds \ # when it detects any changes. See https://hudson.dev.java.net/ \ # for more details. # processname: hudson # pidfile: /var/run/hudson.pid # Source function library. . /etc/rc.d/init.d/functions # Get config. . /etc/sysconfig/network # Check that networking is up. [ "${NETWORKING}" = "no" ] && exit 0 startup=/usr/local/bin/start-hudson.sh shutdown=/usr/local/bin/stop-hudson.sh HUDSON_WAR=/opt/hudson.war HUDSON_LOG=/home/tomcat/hudson.log HUDSON_HOME=/opt/hudson export JAVA_HOME=/usr/java/jdk1.6.0 HUDSON_USER=tomcat export HUDSON_HOME=/opt/hudson JAVA=$JAVA_HOME/bin/java start(){ echo -n $"Starting Hudson service: " su - $HUDSON_USER -c "nohup nice $JAVA -DHUDSON_HOME=$HUDSON_HOME -jar $HUDSON_WAR --httpPort=8099 --logfile $HUDSON_LOG &" echo "run..." RETVAL=$? echo } stop(){ action $"Stopping Hudson service: " su - $HUDSON_USER -c "kill `ps -ef | grep hudson.war | grep -v grep | awk '{ print $2 }'`" RETVAL=$? echo } status(){ numproc=`ps -ef | grep hudson.war | grep -v "grep hudson.war" | wc -l` if [ $numproc -gt 0 ]; then echo "Hudson is running..." else echo "Hudson is stopped..." fi } restart(){ stop start } # See how we were called. case "$1" in start) start ;; stop) stop ;; status) status ;; restart) restart ;; *) echo $"Usage: $0 {start|stop|status|restart}" exit 1 esac exit 0
Version data entries
37 entries across 37 versions & 2 rubygems