Blame | Last modification | View Log | RSS feed
#! /bin/bash## saslauthd Start/Stop the SASL authentication daemon## chkconfig: - 65 10# description: Saslauthd is a server process which handles plaintext \# authentication requests on behalf of the cyrus-sasl library.# processname: saslauthd### BEGIN INIT INFO# Provides: saslauthd# Required-Start: $local_fs $network# Required-Stop: $local_fs $network# Short-Description: Start/Stop the SASL authentication daemon# Description: Saslauthd is a server process which handles plaintext# authentication requests on behalf of the cyrus-sasl library.### END INIT INFO# Source function library.. /etc/init.d/functions# Source our configuration file for these variables.SOCKETDIR=/var/run/saslauthdMECH=shadowFLAGS=if [ -f /etc/sysconfig/saslauthd ] ; then. /etc/sysconfig/saslauthdfiRETVAL=0# Set up some common variables before we launch into what might be# considered boilerplate by now.prog=saslauthdpath=/usr/sbin/saslauthdlockfile=/var/lock/subsys/$progpidfile=/var/run/saslauthd/saslauthd.pidstart() {[ -x $path ] || exit 5echo -n $"Starting $prog: "daemon $DAEMONOPTS $path -m $SOCKETDIR -a $MECH $FLAGSRETVAL=$?echo[ $RETVAL -eq 0 ] && touch $lockfilereturn $RETVAL}stop() {echo -n $"Stopping $prog: "killproc $progRETVAL=$?echo[ $RETVAL -eq 0 ] && rm -f $lockfilereturn $RETVAL}restart() {stopstart}reload() {restart}force_reload() {restart}rh_status() {# run checks to determine if the service is running or use generic statusstatus -p $pidfile $prog}rh_status_q() {rh_status >/dev/null 2>&1}case "$1" instart)rh_status_q && exit 0start;;stop)rh_status_q || exit 0stop;;restart)restart;;reload)rh_status_q || exit 7reload;;force-reload)force_reload;;status)rh_status;;condrestart|try-restart)rh_status_q || exit 0restart;;*)echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"exit 2esacexit $?