]> git.pld-linux.org Git - packages/courier-imap.git/blame - courier-imap-authdaemon.init
- fixed mysql detection problem (--with-mysql-libs must be specified)
[packages/courier-imap.git] / courier-imap-authdaemon.init
CommitLineData
a0c812d1 1#!/bin/sh
2# IMAP Auth Daemon
3#
4# chkconfig: 345 80 20
5# description: IMAP Auth Daemon
6
7# Source function library
8. /etc/rc.d/init.d/functions
9
10# Get network config
11. /etc/sysconfig/network
12
13METHOD="plain"
14
15[ -f /etc/sysconfig/authdaemon ] && . /etc/sysconfig/authdaemon
16
17# Check that networking is up.
18if is_no "${NETWORKING}" ; then
19 msg_Network_Down "Courier IMAP - Authdaemon"
20 exit 1
21fi
22
23# See how we were called.
24case "$1" in
25 start)
26 # Check if the service is already running?
27 if [ ! -f /var/lock/subsys/authdaemon ]; then
28 msg_starting "Courier IMAP - Authdaemon"
29 daemon /usr/lib/courier-imap/authlib/authdaemond.$METHOD start
30 RETVAL=$?
31 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/authdaemon
32 else
33 msg_Already_Running "Courier IMAP - Authdaemon"
34 exit 1
35 fi
36 ;;
37 stop)
38 if [ -f /var/lock/subsys/authdaemon ]; then
39 msg_stopping "Courier IMAP - Authdaemon"
40 daemon /usr/lib/courier-imap/authlib/authdaemond.$METHOD stop
41 RETVAL=$?
42 rm -f /var/lock/subsys/authdaemon
43 else
44 msg_not_running "Courier IMAP - Authdaemon"
45 exit 1
46 fi
47 ;;
48 restart|reload)
49 $0 stop
50 $0 start
51 ;;
52 status)
53 status authdaemond.$METHOD
54 ;;
55 *)
56 msg_Usage "$0 {start|stop|restart|reload|status}"
57 exit 1
58esac
59
60exit $RETVAL
61
This page took 0.026024 seconds and 4 git commands to generate.