summaryrefslogtreecommitdiffstats
path: root/main/trac/tracd.initd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-06-11 13:18:22 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-06-11 13:18:22 +0000
commit3a4b60e9e1c4fd340d6847f3f3d4b1380387026a (patch)
tree2316472742fcd3dffb5e1749b67084c626cd5a49 /main/trac/tracd.initd
parent6be82ec40a642fc049398d571ce8394ca88d43ab (diff)
downloadaports-3a4b60e9e1c4fd340d6847f3f3d4b1380387026a.tar.bz2
aports-3a4b60e9e1c4fd340d6847f3f3d4b1380387026a.tar.xz
main/trac,py-sqlite,py-setuptools,py-genshi: moved from testing
Diffstat (limited to 'main/trac/tracd.initd')
-rwxr-xr-xmain/trac/tracd.initd27
1 files changed, 27 insertions, 0 deletions
diff --git a/main/trac/tracd.initd b/main/trac/tracd.initd
new file mode 100755
index 000000000..83f84052d
--- /dev/null
+++ b/main/trac/tracd.initd
@@ -0,0 +1,27 @@
+#!/sbin/runscript
+# 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 --chuid ${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 $?
+}