]> git.pld-linux.org Git - packages/cyrus-sasl.git/blame - saslauthd.init
- db 4.6 supported
[packages/cyrus-sasl.git] / saslauthd.init
CommitLineData
f1b54e59
AF
1#!/bin/sh
2#
3# saslauthd SASL AUTH Daemon
4#
5# chkconfig: 2345 40 60
6# description: SASL AUTH Daemon
7# processname: saslauthd
8# pidfile: /var/state/sasl/mux.pid
9
10# $Id$
11
12# Source function library
13. /etc/rc.d/init.d/functions
14
15# Get service config
16[ -f /etc/sysconfig/saslauthd ] && . /etc/sysconfig/saslauthd
17
7b3dc8ae 18if [ "x$SASL_AUTHMECH" != "x" ]; then
f1b54e59
AF
19 SASLAUTHD_OPTS="$SASLAUTHD_OPTS -a $SASL_AUTHMECH"
20fi
21
7b3dc8ae 22if [ "x$SASL_RIMAP_HOSTNAME" != "x" ]; then
fed81295 23 SASLAUTHD_OPTS="$SASLAUTHD_OPTS -O $SASL_RIMAP_HOSTNAME"
f1b54e59
AF
24fi
25
351fc67a 26#if is_yes "$SASL_TIME_OF_DAY_LOGIN_RESTRICTIONS" ; then
27# SASLAUTHD_OPTS="$SASLAUTHD_OPTS -T"
28#fi
f1b54e59 29
7b3dc8ae 30RETVAL=0
f1b54e59
AF
31# See how we were called.
32case "$1" in
33 start)
34 # Check if the service is already running?
7436efc0 35 if [ ! -f /var/lock/subsys/saslauthd ]; then
894e1273 36 msg_starting saslauthd
f1b54e59 37 daemon saslauthd $SASLAUTHD_OPTS
7436efc0 38 RETVAL=$?
39 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/saslauthd
f1b54e59 40 else
7436efc0 41 msg_already_running saslauthd
f1b54e59
AF
42 fi
43 ;;
44 stop)
7436efc0 45 # Stop daemons.
f1b54e59 46 if [ -f /var/lock/subsys/saslauthd ]; then
7436efc0 47 msg_stopping saslauthd
48 killproc saslauthd
49 rm -f /var/lock/subsys/saslauthd /var/run/saslauthd.pid >/dev/null 2>&1
50 else
9e27eb77 51 msg_not_running saslauthd
f1b54e59
AF
52 fi
53 ;;
54 status)
55 status saslauthd
56 exit $?
57 ;;
7b3dc8ae 58 restart|force-reload)
f1b54e59
AF
59 $0 stop
60 $0 start
7436efc0 61 exit $?
62 ;;
f1b54e59 63 *)
7b3dc8ae 64 msg_usage "$0 {start|stop|restart|force-reload|status}"
65 exit 3
f1b54e59
AF
66esac
67
68exit $RETVAL
This page took 0.044267 seconds and 4 git commands to generate.