diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2019-09-01 00:00:32 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2019-09-01 00:00:32 +0200 |
commit | ca9627e70852f6b2e835660df870fe3ab405882d (patch) | |
tree | 0a008b1d5b16fa0679a195ed7b5662c7891f591c /www-apps/trac/files/tracd.initd | |
download | darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.gz darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.bz2 darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.xz darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.zip |
Initial import
Diffstat (limited to 'www-apps/trac/files/tracd.initd')
-rw-r--r-- | www-apps/trac/files/tracd.initd | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/www-apps/trac/files/tracd.initd b/www-apps/trac/files/tracd.initd new file mode 100644 index 0000000..c5a5432 --- /dev/null +++ b/www-apps/trac/files/tracd.initd @@ -0,0 +1,26 @@ +#!/sbin/openrc-run +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +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} --group ${TRACD_GROUP:-tracd} \ + --pidfile /var/run/tracd.pid --make-pidfile --background \ + --env PYTHON_EGG_CACHE="/var/lib/trac/egg-cache" \ + --exec /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 $? +} |