aboutsummaryrefslogtreecommitdiffstats
path: root/main/git/git-daemon.initd
blob: c6ee19f5c034fcf8768dd63a7203700a06040ee0 (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
28
29
30
#!/sbin/runscript
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/files/git-daemon.initd,v 1.1 2010/03/17 15:13:27 sping Exp $

PIDFILE=/var/run/git-daemon.pid

depend() {
	need net
	use logger
}

start() {
	[ -e /lib/librc.so ] || BL1_COMPAT="--name git-daemon"
	ebegin "Starting git-daemon"
		start-stop-daemon --start --quiet --background \
		--pidfile ${PIDFILE} ${BL1_COMPAT} \
		--exec /usr/bin/git -- daemon \
			--pid-file=${PIDFILE} \
			--user=${GIT_USER} --group=${GIT_GROUP} \
			${GITDAEMON_OPTS}
	eend $?
}

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