blob: 0021d63f505521d76f52810b8d5ba14bd7d11c12 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/sbin/openrc-run
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /var/cvsroot/gentoo-x86/www-apps/trac/files/tracd.initd,v 1.4 2010/05/28 14:43:40 arfrever Exp $
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 --user ${TRACD_USER:-tracd}:${TRACD_GROUP:-tracd} \
--pidfile /var/run/tracd.pid --make-pidfile --background \
--env PYTHON_EGG_CACHE="/var/lib/trac/egg-cache" \
--exec /usr/bin/python -- /usr/bin/tracd \
-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 $?
}
|