]>
Commit | Line | Data |
---|---|---|
4cc12bee PZ |
1 | #!/bin/sh |
2 | # | |
3 | # func: Starts the func certmaster daemon | |
4 | # | |
5 | # Version: @(#) /etc/rc.d/init.d/func 0.1 | |
6 | # | |
7 | # chkconfig: - 98 99 | |
8 | # description: Starts and stops the func daemon at startup and shutdown.. | |
9 | ||
10 | . /etc/rc.d/init.d/functions | |
11 | ||
12 | RETVAL=0 | |
13 | # See how we were called. | |
14 | case "$1" in | |
15 | start) | |
16 | # Check if the service is already running? | |
17 | if [ ! -f /var/lock/subsys/certmaster ]; then | |
18 | msg_starting "certmaster" | |
19 | daemon /usr/bin/certmaster | |
20 | RETVAL=$? | |
21 | [ $RETVAL -eq 0 ] && touch /var/lock/subsys/certmaster | |
22 | else | |
23 | msg_already_running "certmaster" | |
24 | fi | |
25 | ;; | |
26 | stop) | |
27 | if [ -f /var/lock/subsys/certmaster ]; then | |
28 | msg_stopping "certmaster" | |
29 | killproc certmaster | |
30 | rm -f /var/lock/subsys/certmaster | |
31 | else | |
32 | msg_not_running "certmaster" | |
33 | fi | |
34 | ;; | |
35 | status) | |
36 | status certmaster | |
37 | exit $? | |
38 | ;; | |
39 | restart|force-reload) | |
40 | $0 stop | |
41 | $0 start | |
42 | exit $? | |
43 | ;; | |
44 | *) | |
45 | msg_usage "$0 {start|stop|restart|force-reload|status}" | |
46 | exit 3 | |
47 | esac | |
48 | ||
49 | exit $RETVAL |