proposal for tracd rc.d script

Francisco de Borja López Río borja at pexego.es
Tue Jan 26 17:00:29 UTC 2010


Hi ppl, 

I've been working lately in a rc.d script for tracd, the standalone
daemon included with trac and I would like to share with the people in
this list. Take a look and see if it is worth to use (any
comments/suggestions/recommendations will be appreciated).

The script is here:

http://paste.e-shell.org/bash164961698

(do not worry about the bash thing, is how the paste tool classifies the sources)

This is a plain txt version (no colors):

http://paste.e-shell.org/bash164961698/get_source?text=1 

A lot of people use trac behind apache, cherokee or
[put-here-your-webserver-of-choice] but there are some environments
where it is a better idea to run the tracd standalone daemon. Searching
a little bit I found this rc.d script:

http://adrenalinexp.wordpress.com/2008/03/23/freebsd-tracd-rcd-script/

Which is quite simple and seemed to works ok, but I've created another
one with the following benefits:

- Allows multiple trac instances to be started in different ports from
  the same script (got the idea from the Zope2.10 rc.d script)

- Allows to set single or multi trac environments per instance (playing
with the flags properly)

- Allows to activate htdigest auth per instance easily (you just have
  to add the htdigest file in the proper place and then set the knob in
  rc.conf)

Obviously, it could be used to start a single instance too, both in
single or multi environment mode, so it is quite flexible (IMHO).

This is a first approach, and it has been tested in 7.0, 7-STABLE and
8-STABLE machines (working fine). I've been thinking in another
approach that could be even more customizable, that is, modifying the
script a little bit so it works similar to the /etc/rc.d/jail script
(more info here:
http://www.freebsd.org/doc/en/books/handbook/jails-build.html). This
approach will allow a user to set a specific port/auth file/etc per
instance, instead of doing all the magic automatically.

oppinions? do you think it would be nice to have this rc.d script in
the current trac port?

-- 

"Do nothing which is of no use." - Miyamoto Musashi
---------------------------------------------------------------------
Francisco de Borja Lopez Rio (borja at pexego.es)
Pexego Sistemas Informaticos S.L.
http://www.pexego.es



More information about the freebsd-ports mailing list