Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 523 - (hide annotations) (download)
Mon Mar 24 01:27:39 2008 UTC (16 years, 2 months ago) by niro
File size: 894 byte(s)
-git-1.5.4.4-r1

1 niro 523 #!/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     echo -e ${COLOREDSTAR}"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     echo -e ${COLOREDSTAR}"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     echo "Usage: $0 {start|stop|restart|status}"
48     exit 1
49     ;;
50     esac