]> git.pld-linux.org Git - packages/courier-authlib.git/blame - courier-authlib.init
- disable ltdl install, release 2
[packages/courier-authlib.git] / courier-authlib.init
CommitLineData
332a2647
AM
1#!/bin/sh
2#
3# courier-authlib courier-authlib
4#
5# chkconfig: 345 85 15
b9983a0a 6# description: courier-authlib
332a2647
AM
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.
19if is_yes "${NETWORKING}"; then
20 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
332a2647
AM
21 msg_network_down courier-authlib
22 exit 1
23 fi
24else
25 exit 0
26fi
27
ef33ce83 28start() {
332a2647
AM
29 # Check if the service is already running?
30 if [ ! -f /var/lock/subsys/courier-authlib ]; then
31 msg_starting courier-authlib
14e3e38a 32 daemon /usr/sbin/authdaemond start
332a2647
AM
33 RETVAL=$?
34 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/courier-authlib
35 else
36 msg_already_running courier-authlib
37 fi
ef33ce83
ER
38}
39
40stop() {
332a2647
AM
41 # Stop daemons.
42 if [ -f /var/lock/subsys/courier-authlib ]; then
43 msg_stopping courier-authlib
14e3e38a 44 daemon /usr/sbin/authdaemond stop
332a2647
AM
45 rm -f /var/lock/subsys/courier-authlib >/dev/null 2>&1
46 else
47 msg_not_running courier-authlib
48 fi
ef33ce83
ER
49}
50
51RETVAL=0
52# See how we were called.
53case "$1" in
54 start)
55 start
56 ;;
57 stop)
58 stop
332a2647
AM
59 ;;
60 status)
61 status authdaemond
62 RETVAL=$?
63 ;;
64 restart)
ef33ce83
ER
65 stop
66 start
332a2647
AM
67 ;;
68 reload|force-reload|graceful)
69 if [ -f /var/lock/subsys/courier-authlib ]; then
70 msg_reloading courier-authlib
14e3e38a 71 daemon /usr/sbin/authdaemond restart
332a2647
AM
72 RETVAL=$?
73 else
74 msg_not_running courier-authlib
75 RETVAL=7
76 fi
77 ;;
78 *)
79 msg_usage "$0 {start|stop|restart|reload|force-reload|graceful|status}"
80 exit 3
81 ;;
82esac
83
84exit $RETVAL
This page took 0.146549 seconds and 4 git commands to generate.