3 # saslauthd SASL AUTH Daemon
5 # chkconfig: 2345 40 60
7 # description: SASL AUTH Daemon
9 # processname: saslauthd
10 # pidfile: /var/lib/sasl2/saslauthd.pid
14 # Source function library
15 . /etc/rc.d/init.d/functions
18 . /etc/sysconfig/network
20 # Check that networking is up.
21 if is_yes "${NETWORKING}"; then
22 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
23 msg_network_down "SASL AUTH Daemon"
30 # Get service config - may override defaults
31 [ -f /etc/sysconfig/saslauthd ] && . /etc/sysconfig/saslauthd
33 if [ "$SASL_AUTHMECH" ]; then
34 SASLAUTHD_OPTS="$SASLAUTHD_OPTS -a $SASL_AUTHMECH"
37 if [ "$SASL_RIMAP_HOSTNAME" ]; then
38 SASLAUTHD_OPTS="$SASLAUTHD_OPTS -O $SASL_RIMAP_HOSTNAME"
41 if is_yes "$SASLAUTHD_CACHE"; then
42 SASLAUTHD_OPTS="$SASLAUTHD_OPTS -c"
45 if [ "$SASLAUTHD_THREADS" ]; then
46 SASLAUTHD_OPTS="$SASLAUTHD_OPTS -n $SASLAUTHD_THREADS"
50 # Check if the service is already running?
51 if [ -f /var/lock/subsys/saslauthd ]; then
52 msg_already_running "SASL AUTH Daemon"
56 msg_starting "SASL AUTH Daemon"
57 daemon /usr/sbin/saslauthd $SASLAUTHD_OPTS
59 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/saslauthd
63 if [ ! -f /var/lock/subsys/saslauthd ]; then
64 msg_not_running "SASL AUTH Daemon"
69 msg_stopping "SASL AUTH Daemon"
71 rm -f /var/lock/subsys/saslauthd /var/lib/sasl2/saslauthd.pid >/dev/null 2>&1
75 if [ ! -f /var/lock/subsys/saslauthd ]; then
76 msg_not_running "SASL AUTH Daemon"
86 # See how we were called.
109 msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"