3 # courier-authlib courier-authlib
6 # description: courier-authlib
9 # Source function library
10 . /etc/rc.d/init.d/functions
13 . /etc/sysconfig/network
16 [ -f /etc/sysconfig/courier-authlib ] && . /etc/sysconfig/courier-authlib
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
29 # Check if the service is already running?
30 if [ -f /var/lock/subsys/courier-authlib ]; then
31 msg_already_running courier-authlib
35 msg_starting courier-authlib
36 daemon /usr/sbin/authdaemond start
38 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/courier-authlib
43 if [ ! -f /var/lock/subsys/courier-authlib ]; then
44 msg_not_running courier-authlib
48 msg_stopping courier-authlib
49 daemon /usr/sbin/authdaemond stop
50 rm -f /var/lock/subsys/courier-authlib >/dev/null 2>&1
54 if [ ! -f /var/lock/subsys/courier-authlib ]; then
55 msg_not_running courier-authlib
60 msg_reloading courier-authlib
61 daemon /usr/sbin/authdaemond restart
66 if [ ! -f /var/lock/subsys/courier-authlib ]; then
67 msg_not_running courier-authlib
77 # See how we were called.
92 reload|force-reload|graceful)
100 msg_usage "$0 {start|stop|restart|reload|force-reload|graceful|try-restart|status}"