aboutsummaryrefslogtreecommitdiffstats
path: root/main/git/git-daemon.initd
diff options
context:
space:
mode:
Diffstat (limited to 'main/git/git-daemon.initd')
-rw-r--r--main/git/git-daemon.initd27
1 files changed, 27 insertions, 0 deletions
diff --git a/main/git/git-daemon.initd b/main/git/git-daemon.initd
new file mode 100644
index 0000000000..cb26b512f1
--- /dev/null
+++ b/main/git/git-daemon.initd
@@ -0,0 +1,27 @@
+#!/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() {
+ ebegin "Starting git-daemon"
+ /usr/bin/git daemon --detach \
+ --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 $?
+}