#!/bin/bash # # kpropd.init Start and stop the Kerberos 5 propagation client. # # chkconfig: 345 35 65 # description: Kerberos 5 is a trusted third-party authentication system. \ # This script starts and stops the service that allows this \ # KDC to receive updates from your master KDC. # processname: kpropd # ### BEGIN INIT INFO # Provides: kpropd # Required-Start: $network # Required-Stop: $network # Default-Start: 3 4 5 # Short-Description: Kerberos 5 replication daemon # Description: The Kerberos 5 replication daemon is used to replicate \ # the principal database to a slave KDC ### END INIT INFO # Get config. . /etc/sysconfig/network # Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0 # Source function library. . /etc/init.d/functions RETVAL=0 prog="Kerberos 5 Propagation Server" kpropd=/usr/sbin/kpropd # Sheel functions to cut down on useless shell instances. start() { if [ ! -f /etc/kerberos/krb5kdc/kpropd.acl ] ; then exit 0 fi echo -n $"Starting $prog: " daemon ${kpropd} -S RETVAL=$? echo [ $RETVAL = 0 ] && touch /var/lock/subsys/kprop return $RETVAL } stop() { echo -n $"Stopping $prog: " killproc ${kpropd} RETVAL=$? echo [ $RETVAL = 0 ] && rm -f /var/lock/subsys/kprop return $RETVAL } # See how we were called. case "$1" in start) start RETVAL=$? ;; stop) stop RETVAL=$? ;; restart|reload) stop start RETVAL=$? ;; status) status ${kpropd} RETVAL=$? ;; condrestart) if [ -f /var/lock/subsys/kprop ] ; then stop start RETVAL=$? fi ;; *) echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}" RETVAL=1 ;; esac exit $RETVAL