]> git.pld-linux.org Git - packages/coda.git/blob - coda.auth2.init
- typo / formatting / etc.
[packages/coda.git] / coda.auth2.init
1 #!/bin/sh
2 #
3 # auth2         
4 #
5 # chkconfig:    345 95 01
6 #
7 # description:  The Coda authentication server
8 #
9
10 # Source function library
11 . /etc/rc.d/init.d/functions
12
13 # Get network config
14 . /etc/sysconfig/network
15
16 # Check that networking is up
17 if is_yes "${NETWORKING}"; then
18         if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
19                 msg_network_down auth2
20                 exit 1
21         fi
22 else
23         exit 0
24 fi
25
26 RETVAL=0
27 case "$1" in
28   start)
29         # Check if the service is already running?
30         if [ ! -f /var/lock/subsys/auth2 ]; then
31                 msg_starting auth2
32                 daemon auth2
33                 RETVAL=$?
34                 [ RETVAL -eq 0 ] && touch /var/lock/subsys/auth2
35         else
36                 msg_already_running auth2
37         fi
38         ;;
39   stop)
40         if [ -f /var/lock/subsys/auth2 ]; then
41                 msg_stopping auth2
42                 killproc auth2
43                 rm -f /var/lock/subsys/auth2
44         else
45                 msg_not_running auth2
46         fi
47         ;;
48   status)
49         status auth2
50         exit $?
51         ;;
52   restart|force-reload)
53         $0 stop
54         $0 start
55         exit $?
56         ;;
57   *)
58         msg_usage "$0 {start|stop|restart|force-reload|status}"
59         exit 3
60         ;;
61 esac
62
63 exit $RETVAL
This page took 0.102748 seconds and 3 git commands to generate.