summaryrefslogtreecommitdiffstats
path: root/www-apps/loggerhead/files/loggerhead.init
blob: 2eceefd18c943066e57fb54889e4cc886ebb702d (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/runscript
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

PIDFILE=/var/run/loggerhead.pid
LOGDIR=/var/log/loggerhead

depend() {
	need net
}

start() {
	ebegin "Starting loggerhead"
	start-stop-daemon --start --quiet --background \
		--make-pidfile --pidfile ${PIDFILE} \
		--exec /usr/bin/serve-branches -- --log-folder=${LOGDIR} \
		${LOGGERHEAD_OPTS}
	eend $?
}

stop() {
	ebegin "Stopping loggerhead"
	start-stop-daemon --stop --quiet \
		--pidfile ${PIDFILE}
	eend $?
}