]> git.pld-linux.org Git - packages/courier-authlib.git/blob - courier-authlib.init
- rel 5 (libmysqlclient_15)
[packages/courier-authlib.git] / courier-authlib.init
1 #!/bin/sh
2 #
3 # courier-authlib       courier-authlib
4 #
5 # chkconfig:    345 85 15
6 # description:  courier-authlib
7 #
8
9 # Source function library
10 . /etc/rc.d/init.d/functions
11
12 # Get network config
13 . /etc/sysconfig/network
14
15 # Get service config
16 [ -f /etc/sysconfig/courier-authlib ] && . /etc/sysconfig/courier-authlib
17
18 # Check that networking is up.
19 if is_yes "${NETWORKING}"; then
20         if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
21                 msg_network_down courier-authlib
22                 exit 1
23         fi
24 else
25         exit 0
26 fi
27
28 RETVAL=0
29 # See how we were called.
30 case "$1" in
31   start)
32         # Check if the service is already running?
33         if [ ! -f /var/lock/subsys/courier-authlib ]; then
34                 msg_starting courier-authlib
35                 daemon /usr/sbin/authdaemond start
36                 RETVAL=$?
37                 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/courier-authlib
38         else
39                 msg_already_running courier-authlib
40         fi
41         ;;
42   stop)
43         # Stop daemons.
44         if [ -f /var/lock/subsys/courier-authlib ]; then
45                 msg_stopping courier-authlib
46                 daemon /usr/sbin/authdaemond stop
47                 rm -f /var/lock/subsys/courier-authlib >/dev/null 2>&1
48         else
49                 msg_not_running courier-authlib
50         fi
51         ;;
52   status)
53         status authdaemond
54         RETVAL=$?
55         ;;
56   restart)
57         $0 stop
58         $0 start
59         ;;
60   reload|force-reload|graceful)
61         if [ -f /var/lock/subsys/courier-authlib ]; then
62                 msg_reloading courier-authlib
63                 daemon /usr/sbin/authdaemond restart
64                 RETVAL=$?
65         else
66                 msg_not_running courier-authlib
67                 RETVAL=7
68         fi
69         ;;
70   *)
71         msg_usage "$0 {start|stop|restart|reload|force-reload|graceful|status}"
72         exit 3
73         ;;
74 esac
75
76 exit $RETVAL
This page took 0.478351 seconds and 3 git commands to generate.