cvsdist 0bb98ee
#!/bin/bash
cvsdist af3b546
#
cvsdist af3b546
# kpropd.init  Start and stop the Kerberos 5 propagation client.
cvsdist af3b546
#
cvsdist af3b546
# chkconfig:   - 35 65
cvsdist af3b546
# description: Kerberos 5 is a trusted third-party authentication system.  \
cvsdist af3b546
#	       This script starts and stops the service that allows this \
cvsdist af3b546
#              KDC to receive updates from your master KDC.
cvsdist af3b546
# processname: kpropd
cvsdist af3b546
#
cvsdist af3b546
9c64850
### BEGIN INIT INFO
9c64850
# Provides: kprop
9c64850
# Required-Start: $local_fs $network
9c64850
# Required-Stop: $local_fs $network
ed48a5c
# Default-Start:
9c64850
# Default-Stop: 0 1 2 3 4 5 6
9c64850
# Short-Description: start and stop the Kerberos 5 propagation client
9c64850
# Description: The kpropd service accepts database updates pushed to it from \
9c64850
#              the master KDC.  It will never be needed on a master KDC.
9c64850
### END INIT INFO
9c64850
cvsdist af3b546
# Get config.
cvsdist af3b546
. /etc/sysconfig/network
cvsdist af3b546
cvsdist af3b546
# Source function library.
cvsdist af3b546
. /etc/init.d/functions
cvsdist af3b546
cvsdist af3b546
RETVAL=0
cvsdist 21f3145
prog="Kerberos 5 Propagation Server"
cvsdist 21f3145
kpropd=/usr/kerberos/sbin/kpropd
cvsdist af3b546
80ff7bf
# Shell functions to cut down on useless shell instances.
cvsdist af3b546
start() {
80ff7bf
  	[ -f /var/kerberos/krb5kdc/kpropd.acl ] || exit 6
80ff7bf
	[ -x $kpropd ] || exit 5
cvsdist 21f3145
	echo -n $"Starting $prog: "
cvsdist 21f3145
	daemon ${kpropd} -S
cvsdist af3b546
	RETVAL=$?
cvsdist 0bb98ee
	echo
cvsdist af3b546
	[ $RETVAL = 0 ] && touch /var/lock/subsys/kprop
cvsdist af3b546
}
cvsdist af3b546
stop() {
cvsdist 21f3145
	echo -n $"Stopping $prog: "
cvsdist 21f3145
	killproc ${kpropd}
cvsdist af3b546
	RETVAL=$?
cvsdist af3b546
	echo
cvsdist af3b546
	[ $RETVAL = 0 ] && rm -f /var/lock/subsys/kprop
cvsdist af3b546
}
cvsdist af3b546
cvsdist af3b546
# See how we were called.
cvsdist af3b546
case "$1" in
cvsdist af3b546
  start)
cvsdist af3b546
	start
cvsdist af3b546
	;;
cvsdist af3b546
  stop)
cvsdist af3b546
	stop
cvsdist af3b546
	;;
9e9f29e
  # We don't really "do" reload, so treat it as a restart.
9e9f29e
  restart|reload)
cvsdist af3b546
	stop
cvsdist af3b546
	start
cvsdist af3b546
	;;
cvsdist af3b546
  status)
cvsdist 21f3145
	status ${kpropd}
cvsdist 21f3145
	retval=$?
cvsdist af3b546
	;;
cvsdist af3b546
  condrestart)
cvsdist af3b546
	if [ -f /var/lock/subsys/kprop ] ; then
cvsdist af3b546
		stop
cvsdist af3b546
		start
cvsdist af3b546
	fi
cvsdist af3b546
	;;
cvsdist af3b546
  *)
cvsdist 0bb98ee
	echo $"Usage: $0 {start|stop|status|restart|condrestart}"
80ff7bf
	RETVAL=2
cvsdist af3b546
	;;
cvsdist af3b546
esac
cvsdist af3b546
cvsdist af3b546
exit $RETVAL