SOURCES: git-core.sysconfig (NEW), git-core.inet (NEW), git-core.i...

adamg adamg at pld-linux.org
Wed Nov 21 21:26:00 CET 2007


Author: adamg                        Date: Wed Nov 21 20:26:00 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- new

---- Files affected:
SOURCES:
   git-core.sysconfig (NONE -> 1.1)  (NEW), git-core.inet (NONE -> 1.1)  (NEW), git-core.init (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/git-core.sysconfig
diff -u /dev/null SOURCES/git-core.sysconfig:1.1
--- /dev/null	Wed Nov 21 21:26:00 2007
+++ SOURCES/git-core.sysconfig	Wed Nov 21 21:25:54 2007
@@ -0,0 +1,8 @@
+# Customized settings for git-daemon
+
+# Daemon options, consult man 1 git-daemon 
+# for a complete list of options
+DAEMON_OPTS="--syslog --base-path=/var/lib/git"
+
+# Define nice level for ssh
+SERVICE_RUN_NICE_LEVEL="+0"

================================================================
Index: SOURCES/git-core.inet
diff -u /dev/null SOURCES/git-core.inet:1.1
--- /dev/null	Wed Nov 21 21:26:00 2007
+++ SOURCES/git-core.inet	Wed Nov 21 21:25:54 2007
@@ -0,0 +1,9 @@
+SERVICE_NAME=git
+SOCK_TYPE=stream
+PROTOCOL=tcp
+PORT=9418
+FLAGS=nowait
+USER=root
+SERVER=tcpd
+DAEMON=/usr/bin/git-daemon
+DAEMONARGS="--inetd --syslog --base-path=/var/lib/git"

================================================================
Index: SOURCES/git-core.init
diff -u /dev/null SOURCES/git-core.init:1.1
--- /dev/null	Wed Nov 21 21:26:00 2007
+++ SOURCES/git-core.init	Wed Nov 21 21:25:54 2007
@@ -0,0 +1,96 @@
+#!/bin/sh
+#
+# git-daemon	git-daemon tcp daemon for git
+#
+# chkconfig:	345 90 25
+#
+# description:	git-daemon is a simple tcp daemon that serves git repositories
+#
+# $Id$
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+DAEMON_OPTS="--syslog"
+
+# Get service config - may override defaults
+[ -f /etc/sysconfig/git-daemon ] && . /etc/sysconfig/git-daemon
+
+# Check that networking is up.
+if is_yes "${NETWORKING}"; then
+	if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
+		msg_network_down git-daemon
+		exit 1
+	fi
+else
+	exit 0
+fi
+
+start() {
+	# Check if the service is already running?
+	if [ ! -f /var/lock/subsys/git-daemon ]; then
+		msg_starting git-daemon
+		daemon --fork git-daemon $DAEMON_OPTS
+		RETVAL=$?
+		[ $RETVAL -eq 0 ] && touch /var/lock/subsys/git-daemon
+	else
+		msg_already_running git-daemon
+	fi
+}
+
+stop() {
+	if [ -f /var/lock/subsys/git-daemon ]; then
+		# Stop daemons.
+		msg_stopping git-daemon
+		killproc git-daemon
+		rm -f /var/lock/subsys/git-daemon
+	else
+		msg_not_running git-daemon
+	fi
+}
+
+reload() {
+	if [ -f /var/lock/subsys/git-daemon ]; then
+		msg_reloading git-daemon
+		killproc git-daemon -HUP
+		RETVAL=$?
+	else
+		msg_not_running git-daemon
+		RETVAL=7
+	fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+  	start
+	;;
+  stop)
+  	stop
+	;;
+  restart)
+	stop
+	start
+	;;
+  reload)
+  	reload
+	;;
+# ONLY if program allows reloading without stopping
+# otherwise include force-reload with 'reload'
+  force-reload)
+	reload
+	;;
+  status)
+	status git-daemon
+	RETVAL=$?
+	;;
+  *)
+	msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
+	exit 3
+esac
+
+exit $RETVAL
================================================================


More information about the pld-cvs-commit mailing list