Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 121566 - Add init.d/tracd script for standalone tracd server
Summary: Add init.d/tracd script for standalone tracd server
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Julien Allanos (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-04 09:31 UTC by Sebastian Bergmann (RETIRED)
Modified: 2006-02-22 14:13 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
www-apps/trac/files/tracd.confd (tracd.confd,359 bytes, text/plain)
2006-02-06 15:03 UTC, Julien Allanos (RETIRED)
Details
www-apps/trac/files/tracd.initd (tracd.initd,653 bytes, text/plain)
2006-02-06 15:04 UTC, Julien Allanos (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Bergmann (RETIRED) gentoo-dev 2006-02-04 09:31:53 UTC
Tracd is a lightweight standalone Trac web server. In most cases it's easier to setup and runs faster than the CGI script.

See http://projects.edgewall.com/trac/wiki/TracStandalone for details.
Comment 1 Julien Allanos (RETIRED) gentoo-dev 2006-02-05 13:19:39 UTC
An init script could probably be written, which would run tracd as a specific user (instead of root). Here is my proposal:

 * trac ebuild installs /etc/init.d/tracd
 * trac ebuild installs /etc/conf.d/tracd
 * trac ebuild adds a tracd user and group to the system

The previous steps would be unconditional. Then, if the user wants to use tracd:

 * he creates svn and trac projects, and chown -R tracd:tracd the appropriate directories
 * he selects a port number (>1023) add adds project paths + auth information as command line options in /etc/conf.d/tracd.

Could tracd be run using start-stop-daemon, or nohup?

Sebastian, would this be acceptable?
Comment 2 Sebastian Bergmann (RETIRED) gentoo-dev 2006-02-05 14:01:28 UTC
Sounds good to me.

With regard to start-stop-daemon I cannot help you, however, as I haven't looked at it yet.
Comment 3 Julien Allanos (RETIRED) gentoo-dev 2006-02-06 15:03:56 UTC
Created attachment 79063 [details]
www-apps/trac/files/tracd.confd

/etc/conf.d/tracd
Comment 4 Julien Allanos (RETIRED) gentoo-dev 2006-02-06 15:04:30 UTC
Created attachment 79064 [details]
www-apps/trac/files/tracd.initd

/etc/init.d/tracd
Comment 5 Julien Allanos (RETIRED) gentoo-dev 2006-02-06 15:05:30 UTC
I really need help improving the init script, it is rather dirty atm but I don't know how to make better.
Comment 6 Sebastian Bergmann (RETIRED) gentoo-dev 2006-02-13 01:51:44 UTC
The attached init.d script works fine for me, thanks. The only thing missing (that I can think of, at least) is logging to /var/log/tracd.
Comment 7 Julien Allanos (RETIRED) gentoo-dev 2006-02-19 11:13:38 UTC
1/ Sorry but, what logging? I don't think tracd logs anything in daemon mode.

2/ Do you know some Gentoo dev that might be able to help enhancing this start-stop-daemon and PID stuff? I find a bit dirty how it is currently handled, but I couldn't do better. I already asked on #-dev but I got no answer.
Comment 8 Seemant Kulleen (RETIRED) gentoo-dev 2006-02-21 10:40:20 UTC
--make-pidfile doesn't work for you, dju`?
Comment 9 Julien Allanos (RETIRED) gentoo-dev 2006-02-21 13:48:58 UTC
No, the pidfile written by start-stop-daemon contains $PID, although tracd's PID is $PID + 1.
Comment 10 Julien Allanos (RETIRED) gentoo-dev 2006-02-21 13:53:44 UTC
However, tracd writes its real PID to stdout before going daemon, that's why I made the cut thing in the attached tracd.initd file. Any better solution will be welcome, but I'll commit trac-0.9.4 with the current initd tomorrow.
Comment 11 Julien Allanos (RETIRED) gentoo-dev 2006-02-22 14:13:55 UTC
trac-0.9.4 is in CVS, thanks.