]> git.pld-linux.org Git - packages/courier-authlib.git/blame - courier-authlib.init
- remove static link flags
[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
28RETVAL=0
29# See how we were called.
30case "$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
14e3e38a 35 daemon /usr/sbin/authdaemond start
332a2647
AM
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
14e3e38a 46 daemon /usr/sbin/authdaemond stop
332a2647
AM
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
14e3e38a 63 daemon /usr/sbin/authdaemond restart
332a2647
AM
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 ;;
74esac
75
76exit $RETVAL
This page took 0.050752 seconds and 4 git commands to generate.