cyrus-sasl/saslauthd.init

112 lines
2.0 KiB
Plaintext
Raw Normal View History

#! /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.
auto-import changelog data from cyrus-sasl-2.1.15-6.src.rpm Thu Oct 23 2003 Nalin Dahyabhai <nalin@redhat.com> 2.1.15-6 - use /dev/urandom instead of /dev/random for SASL2 (docs indicate that this is safe if you aren't using OTP or SRP, and we build neither); SASL1 appears to use it to seed the libc RNG only (#103378) Mon Oct 20 2003 Nalin Dahyabhai <nalin@redhat.com> - obey RPM_OPT_FLAGS again when krb5_prefix != %{_prefix} Fri Oct 17 2003 Nalin Dahyabhai <nalin@redhat.com> 2.1.15-5 - install saslauthd's mdoc page instead of the pre-formatted man page, which would get formatted again Mon Sep 15 2003 Nalin Dahyabhai <nalin@redhat.com> - include testsaslauthd - note in the README that the saslauthd protocol is different for v1 and v2, so v1's clients can't talk to the v2 server Thu Aug 21 2003 Nalin Dahyabhai <nalin@redhat.com> 2.1.15-4 - rebuild Thu Aug 21 2003 Nalin Dahyabhai <nalin@redhat.com> 2.1.15-3 - add logic to build with gssapi libs in either /usr or /usr/kerberos Mon Jul 21 2003 Nalin Dahyabhai <nalin@redhat.com> 2.1.15-2 - rebuild Tue Jul 15 2003 Nalin Dahyabhai <nalin@redhat.com> 2.1.15-1 - update to 2.1.15 Mon Jul 14 2003 Nalin Dahyabhai <nalin@redhat.com> 2.1.14-1 - update to 2.1.14 Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com> - rebuilt Fri May 09 2003 Nalin Dahyabhai <nalin@redhat.com> 2.1.13-3 - change -m argument to saslauthd to be a directory instead of a path Thu May 08 2003 Nalin Dahyabhai <nalin@redhat.com> 2.1.13-2 - link libsasl2 with -lpthread to ensure that the sasldb plug-in can always be loaded Tue Apr 29 2003 Nalin Dahyabhai <nalin@redhat.com> 2.1.13-1 - update to 2.1.13
2004-09-09 04:05:05 +00:00
SOCKETDIR=/var/run/saslauthd
MECH=shadow
FLAGS=
if [ -f /etc/sysconfig/saslauthd ] ; then
. /etc/sysconfig/saslauthd
fi
RETVAL=0
# Set up some common variables before we launch into what might be
# considered boilerplate by now.
prog=saslauthd
path=/usr/sbin/saslauthd
lockfile=/var/lock/subsys/$prog
pidfile=/var/run/saslauthd/saslauthd.pid
start() {
[ -x $path ] || exit 5
echo -n $"Starting $prog: "
daemon $DAEMONOPTS $path -m $SOCKETDIR -a $MECH $FLAGS
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch $lockfile
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
killproc $prog
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f $lockfile
return $RETVAL
}
restart() {
stop
start
}
reload() {
restart
}
force_reload() {
restart
}
rh_status() {
# run checks to determine if the service is running or use generic status
status -p $pidfile $prog
}
rh_status_q() {
rh_status >/dev/null 2>&1
}
case "$1" in
start)
rh_status_q && exit 0
start
;;
stop)
rh_status_q || exit 0
stop
;;
restart)
restart
;;
reload)
rh_status_q || exit 7
reload
;;
force-reload)
force_reload
;;
status)
rh_status
;;
condrestart|try-restart)
rh_status_q || exit 0
restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
exit 2
esac
exit $?