Contents of /mcore-src/trunk/mcore-tools/daemon/client/mcored.rc.in
Parent Directory | Revision Log
Revision 2010 -
(show annotations)
(download)
Mon Aug 13 09:47:50 2012 UTC (12 years, 1 month ago) by niro
Original Path: mcore-src/trunk/mcore-tools/daemon/client/mcored.rc
File size: 935 byte(s)
Mon Aug 13 09:47:50 2012 UTC (12 years, 1 month ago) by niro
Original Path: mcore-src/trunk/mcore-tools/daemon/client/mcored.rc
File size: 935 byte(s)
-use rc_print() and rc_echo() functions
1 | #!/bin/bash |
2 | # $Id$ |
3 | |
4 | #%rlevels: 3:s 0:k |
5 | #%start: 90 |
6 | #%stop: 10 |
7 | |
8 | #deps |
9 | #%needs: |
10 | #%before: |
11 | #%after: |
12 | |
13 | source /etc/conf.d/rc |
14 | source $rc_functions |
15 | source /etc/conf.d/mcored |
16 | |
17 | case "$1" in |
18 | start) |
19 | rc_print "Starting mCore client daemon ..." |
20 | start-stop-daemon --start --exec /usr/sbin/sslsvd \ |
21 | --pidfile /var/run/mcored.pid --background --make-pidfile \ |
22 | -- -U ${SSL_USER} -/ ${CHROOT_DIR} -Z ${SSL_CERT} -K ${SSL_KEY} \ |
23 | ${OPTS} ${LISTEN_IP} ${LISTEN_PORT} /usr/sbin/mcored |
24 | evaluate_retval |
25 | |
26 | update_svcstatus $1 |
27 | splash svc_started "$(basename $0)" 0 |
28 | ;; |
29 | |
30 | stop) |
31 | rc_print "Stopping mCore client daemon ..." |
32 | start-stop-daemon --quiet --stop --pidfile /var/run/mcored.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 /usr/sbin/sslsvd |
47 | ;; |
48 | |
49 | *) |
50 | rc_echo "Usage: $0 {start|stop|restart|status}" |
51 | exit 1 |
52 | ;; |
53 | esac |