http://wiki.hudson-ci.org/display/HUDSON/Installation+and+Execution
This is what worked for me. The one hudson website is for linux. This you can use as is without modifications (except for "RUN_AS") on ubuntu
#!/bin/sh
DESC="Hudson CI Server "
NAME=hudson
PIDFILE=/var/run/$NAME.pid
RUN_AS=sysadm
d_start() {
start-stop-daemon --start --quiet --background -m --pidfile $PIDFILE --chuid $RUN_AS --exec /usr/bin/java -- -Dhudson.scm.CVSSCM.skipChangeLog=true -jar /opt/hudson/hudson.war
}
d_stop() {
start-stop-daemon --stop --quiet --pidfile $PIDFILE
if [ -e $PIDFILE ]
then rm $PIDFILE
fi
}
case $1 in
start)
echo -n "Starting $DESC: $NAME "
d_start
echo "."
;;
stop)
echo -n "Stopping $DESC: $NAME "
d_stop
echo "."
;;
restart)
echo -n "Restarting $DESC: $NAME "
d_stop
sleep 1
d_start
echo "."
;;
*)
echo "usage: $NAME {start|stop|restart}"
exit 1
;;
esac
exit 0
No comments:
Post a Comment