FreeBsd tracd “rc.d” script
If you want to run trac as a standalone server for startup you’ll need a /usr/local/etc/rc.d script, by default it is missing.
First google search gave me this http://freebsd.amazingdev.com/blog/archives/000798.html
I have slightly modified this script to play better with pids:
#!/bin/sh
#
# tracd.sh for rc.d usage (c) 2006 Jonathan Arnold, 2008
# $Id$# PROVIDE: tracd
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf to enable Tracd:
#
# tracd_enable=”YES”
# # optional
# tracd_flags=”-d –listen-port=3690″
# tracd_data=”/usr/local/path/to/project”. “/etc/rc.subr”
# Set some defaults
tracd_enable=${tracd_enable:-“NO”}
tracd_flags=${tracd_flags:-“-d –port=8080 “}
tracd_data=${tracd_data:-“/usr/local/trac”}
tracd_pidfile=${tracd_pidfile-“/var/run/tracd.pid”}name=”tracd”
rcvar=`set_rcvar`
load_rc_config $namecommand=/usr/local/bin/tracd
command_args=” –pidfile=${tracd_pidfile} ${tracd_data}”
command_interpreter=”/usr/local/bin/python”
pidfile=”${tracd_pidfile}”run_rc_command “$1”
And your vars in /etc/rc.conf should look smth. like:
tracd_enable=”YES”
tracd_data=”/usr/local/trac/project/”
tracd_flags=”-dsp 8080 –auth=project,/usr/local/trac/project/conf/users.htdigest, ProjectRealm”
Character conversions on your page made it difficult to use. I had to replace all the quotation marks with usual ones and em-dash to “–” manually. You’d better posted it pre-formatted.
Also, it took some time to notice that trac_data should have “-e ” prefix for multi-project Trac configuration.
Thanks for bringing this up, hopefully it’s fixed now.. (dumb wp)
Thanks! Just what I needed.