Magellan Linux

Contents of /trunk/git/git-daemon.rc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1514 - (show annotations) (download)
Thu Sep 1 17:16:32 2011 UTC (12 years, 7 months ago) by niro
File size: 871 byte(s)
-use rc_echo/rc_print
1 #!/bin/bash
2 # $Header: /root/magellan-cvs/src/git/git-daemon.rc,v 1.1 2008-03-24 01:27:39 niro Exp $
3
4 #%rlevels: 0:k 1:k 2:k 3:s 4:k 5:s 6:k
5 #%start: 33
6 #%stop: 27
7
8 #deps
9 #%needs:
10 #%before:
11 #%after:
12
13 source /etc/sysconfig/rc
14 source $rc_functions
15 source /etc/conf.d/git-daemon
16
17 case "$1" in
18 start)
19 rc_print "Starting git daemon ..."
20 start-stop-daemon --start --quiet --background --exec /usr/bin/git-daemon -- ${GITDAEMON_OPTS}
21 evaluate_retval
22
23 update_svcstatus $1
24 splash svc_started "$(basename $0)" 0
25 ;;
26
27 stop)
28 rc_print "Stopping git daemon ..."
29 start-stop-daemon --stop --quiet --name git-daemon
30 evaluate_retval
31
32 update_svcstatus $1
33 splash svc_stopped "$(basename $0)" 0
34 ;;
35
36 restart)
37 $0 stop
38 sleep 1
39 $0 start
40 ;;
41
42 status)
43 statusproc /usr/bin/git-daemon
44 ;;
45
46 *)
47 rc_echo "Usage: $0 {start|stop|restart|status}"
48 exit 1
49 ;;
50 esac