#!/sbin/runscript #--------------------------------------------------------------------------- # This script starts/stops the following # krb5kdc # kadmind #--------------------------------------------------------------------------- # # NB: Config is in /etc/krb5.conf # KRB5_KDC set in /etc/conf.d/krb5 # KRB5_KDC_MASTER set in /etc/conf.d/krb5 # opts="start stop restart" depend() { need net } start() { if [ -f /etc/krb5.conf ] then if [ -n "$KRB5_KDC$KRB5_KDC_MASTER" ]; then daemon="Kerberos 5 KDC" ebegin "Starting $daemon" start-stop-daemon --start --quiet --exec /usr/sbin/krb5kdc 1>&2 eend $? "Error starting $daemon" fi if [ -n "$KRB5_KDC_MASTER" ]; then daemon="Kerberos 5 Admin daemon" ebegin "Starting $daemon" start-stop-daemon --start --quiet --exec /usr/sbin/kadmind 1>&2 eend $? "Error starting $daemon" fi fi } stop() { if [ -n "$KRB5_KDC$KRB5_KDC_MASTER" ]; then daemon="Kerberos 5 KDC" ebegin "Stopping $daemon" start-stop-daemon --stop --quiet --oknodo --exec /usr/sbin/krb5kdc 1>&2 eend $? "Error stopping $daemon" fi if [ -n "$KRB5_KDC_MASTER" ]; then daemon="Kerberos 5 Admin daemon" ebegin "Stopping $daemon" start-stop-daemon --stop --quiet --oknodo --exec /usr/sbin/kadmind 1>&2 eend $? "Error stopping $daemon" fi } restart() { svc_stop svc_start }