Summary: | Add init.d/tracd script for standalone tracd server | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Sebastian Bergmann (RETIRED) <sebastian> |
Component: | Current packages | Assignee: | Julien Allanos (RETIRED) <dju> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | web-apps |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
www-apps/trac/files/tracd.confd
www-apps/trac/files/tracd.initd |
Description
Sebastian Bergmann (RETIRED)
![]() 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? Sounds good to me. With regard to start-stop-daemon I cannot help you, however, as I haven't looked at it yet. Created attachment 79063 [details]
www-apps/trac/files/tracd.confd
/etc/conf.d/tracd
Created attachment 79064 [details]
www-apps/trac/files/tracd.initd
/etc/init.d/tracd
I really need help improving the init script, it is rather dirty atm but I don't know how to make better. 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. 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. --make-pidfile doesn't work for you, dju`? No, the pidfile written by start-stop-daemon contains $PID, although tracd's PID is $PID + 1. 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. trac-0.9.4 is in CVS, thanks. |