Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added a Hint about Ubuntu Init-Script (I hope you dont mind), email me for questions: marcoemrich_at_web.de

...

To see Hudson, simply bring up a web browser and go to URL http://myServer:8080 where myServer is the name of the system running Hudson.

...

Code Block
#!/bin/sh

DESC="Hudson CI Server"
NAME=hudson
PIDFILE=/var/run/$NAME.pid
RUN_AS=hudson
COMMAND=java -jar /home/hudson/hudson.war

d_start() {
	start-stop-daemon --start --quiet --background --make-pidfile --pidfile $PIDFILE --chuid $RUN_AS --exec $COMMAND
}

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


In Ubuntu 9.04-Server this init-script doesn't work. You have to change the start line to

Code Block

  start-stop-daemon --start --quiet --background -m --pidfile $PIDFILE --chuid $RUN_AS --exec /usr/bin/java -- -jar /opt/hudson/hudson.war

Top of page