mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 21:42:27 +00:00
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@27456 71c3de6d-444a-0410-be80-ed276b4c234a
29 lines
611 B
Plaintext
29 lines
611 B
Plaintext
#!/sbin/runscript
|
|
|
|
depend() {
|
|
need net
|
|
use dns logger mysql postgresql
|
|
}
|
|
|
|
HUDSON_PIDFILE=/var/run/hudson/hudson.pid
|
|
RUN_AS=hudson
|
|
|
|
JAVA_HOME=`java-config --jre-home`
|
|
COMMAND=$JAVA_HOME/bin/java
|
|
OPTS="-Xmx256m -jar /usr/lib/hudson/hudson.war --logfile=/var/log/hudson/hudson.log"
|
|
|
|
start() {
|
|
ebegin "Starting ${SVCNAME}"
|
|
start-stop-daemon --start --quiet --background \
|
|
--make-pidfile --pidfile $HUDSON_PIDFILE \
|
|
--chuid $RUN_AS \
|
|
--exec "${COMMAND}" -- $OPTS
|
|
eend $?
|
|
}
|
|
|
|
stop() {
|
|
ebegin "Stopping ${SVCNAME}"
|
|
start-stop-daemon --stop --quiet --pidfile $HUDSON_PIDFILE
|
|
eend $?
|
|
}
|