2008-11-23 15:07:04 +01:00
|
|
|
#!/sbin/runscript
|
2011-04-21 07:24:30 +02:00
|
|
|
# Copyright 1999-2011 Gentoo Foundation
|
2008-11-23 15:07:04 +01:00
|
|
|
# Distributed under the terms of the GNU General Public License, v2 or later
|
2011-04-21 07:24:30 +02:00
|
|
|
# $Header: /var/cvsroot/gentoo-x86/www-apps/trac/files/tracd.initd,v 1.5 2011/02/08 08:02:50 djc Exp $
|
2008-11-23 15:07:04 +01:00
|
|
|
|
|
|
|
depend() {
|
|
|
|
need net
|
|
|
|
}
|
|
|
|
|
|
|
|
start() {
|
|
|
|
ebegin "Starting tracd"
|
|
|
|
# tracd fails to create pidfile if started as non-root user, thus we are asking
|
|
|
|
# s-s-d to do that. To have correct pid we avoid -d option of tracd and use
|
|
|
|
# --background option of s-s-d.
|
|
|
|
start-stop-daemon --start --chuid ${TRACD_USER:-tracd}:${TRACD_GROUP:-tracd} \
|
|
|
|
--pidfile /var/run/tracd.pid --make-pidfile --background \
|
2011-04-21 07:24:30 +02:00
|
|
|
--env PYTHON_EGG_CACHE="/var/lib/trac/egg-cache" \
|
|
|
|
--exec /usr/bin/tracd -- \
|
2008-11-23 15:07:04 +01:00
|
|
|
-p ${TRACD_PORT:-8000} ${TRACD_OPTS:---env-parent-dir /var/lib/trac/}
|
|
|
|
eend $?
|
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
|
|
|
ebegin "Stopping tracd"
|
|
|
|
start-stop-daemon --stop --quiet --pidfile /var/run/tracd.pid
|
|
|
|
eend $?
|
|
|
|
}
|