Contents of /trunk/subversion/svnserve.rc
Parent Directory | Revision Log
Revision 1115 -
(show annotations)
(download)
Sun Aug 22 18:37:54 2010 UTC (14 years, 1 month ago) by niro
File size: 981 byte(s)
Sun Aug 22 18:37:54 2010 UTC (14 years, 1 month ago) by niro
File size: 981 byte(s)
-added
1 | #!/bin/bash |
2 | |
3 | #%rlevels: 0:k 1:k 2:k 3:s 4:k 5:s 6:k |
4 | #%start: 33 |
5 | #%stop: 27 |
6 | |
7 | #deps |
8 | #%needs: |
9 | #%before: |
10 | #%after: |
11 | |
12 | source /etc/sysconfig/rc |
13 | source $rc_functions |
14 | source /etc/conf.d/svnserve |
15 | |
16 | case "$1" in |
17 | start) |
18 | echo -e ${COLOREDSTAR}"Starting svnserve daemon ..." |
19 | start-stop-daemon --start --quiet --background \ |
20 | --make-pidfile --pidfile /var/run/svnserve.pid \ |
21 | --exec /usr/bin/svnserve \ |
22 | --chuid ${SVNSERVE_USER:-svnserve}:${SVNSERVE_GROUP:-svnserve} --\ |
23 | --foreground --daemon ${SVNSERVE_OPTS:---root=/var/svn} |
24 | evaluate_retval |
25 | |
26 | update_svcstatus $1 |
27 | splash svc_started "$(basename $0)" 0 |
28 | ;; |
29 | |
30 | stop) |
31 | echo -e ${COLOREDSTAR}"Stopping svnserve daemon ..." |
32 | start-stop-daemon --stop --quiet --pidfile /var/run/svnserve.pid |
33 | evaluate_retval |
34 | |
35 | update_svcstatus $1 |
36 | splash svc_stopped "$(basename $0)" 0 |
37 | ;; |
38 | |
39 | restart) |
40 | $0 stop |
41 | sleep 1 |
42 | $0 start |
43 | ;; |
44 | |
45 | status) |
46 | statusproc svnserve |
47 | ;; |
48 | |
49 | *) |
50 | echo "Usage: $0 {start|stop|restart|status}" |
51 | exit 1 |
52 | ;; |
53 | esac |