#!/bin/bash # $Header: /root/magellan-cvs/src/git/git-daemon.rc,v 1.1 2008-03-24 01:27:39 niro Exp $ #%rlevels: 0:k 1:k 2:k 3:s 4:k 5:s 6:k #%start: 33 #%stop: 27 #deps #%needs: #%before: #%after: source /etc/sysconfig/rc source $rc_functions source /etc/conf.d/git-daemon case "$1" in start) rc_print "Starting git daemon ..." start-stop-daemon --start --quiet --background --exec /usr/bin/git-daemon -- ${GITDAEMON_OPTS} evaluate_retval update_svcstatus $1 splash svc_started "$(basename $0)" 0 ;; stop) rc_print "Stopping git daemon ..." start-stop-daemon --stop --quiet --name git-daemon evaluate_retval update_svcstatus $1 splash svc_stopped "$(basename $0)" 0 ;; restart) $0 stop sleep 1 $0 start ;; status) statusproc /usr/bin/git-daemon ;; *) rc_echo "Usage: $0 {start|stop|restart|status}" exit 1 ;; esac