Edgewall Software

Here is a simple script to start bitten-slave as a daemon. This will usually be put in /etc/init.d or wherever your init scripts are kept. This has been tested on Gentoo, however should run from any system with only minimal changes. You will need to change the DAEMON_ARG varible to contain a URL which reflects your server.

#!/sbin/runscript

DAEMON_CMD="/usr/bin/bitten-slave"
DAEMON_ARG="http://<domain>/trac.cgi/dANN/builds -i 15"

depend() {
        use net
}

start() {
        ebegin "Starting bitten-slave"
        start-stop-daemon --start -m --quiet --background --pidfile /var/run/bitten-slave.pid --exec $DAEMON_CMD -- $DAEMON_ARG
        eend 0 "bitten-slave"
}

stop() {
        ebegin "Stopping bitten-slave"
        start-stop-daemon --stop --quiet --pidfile /var/run/bitten-slave.pid --oknodo
        eend 0 "bitten-slave"
}

Be sure your "Connection timeout for build slaves" under master settings in trac/bitten is high enough to never cause a timeout. If a timeout occurs before the slave finishes it will receive a 403 forbidden error and the daemon will exit and stop performing builds.

Last modified 9 years ago Last modified on Oct 19, 2009 5:53:04 PM