3ffdc43878
a different location than the default (fenlason) - remove the [kdc] section from the default krb5.conf -- doesn't seem to have been applicable for a while
83 lines
1.5 KiB
Bash
Executable File
83 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# krb5kdc Start and stop the Kerberos 5 servers.
|
|
#
|
|
# chkconfig: - 35 65
|
|
# description: Kerberos 5 is a trusted third-party authentication system. \
|
|
# This script starts and stops the server that Kerberos IV and 5 \
|
|
# clients need to connect to in order to obtain credentials.
|
|
# processname: krb5kdc
|
|
# config: /etc/sysconfig/krb5kdc
|
|
#
|
|
|
|
# Get config.
|
|
. /etc/sysconfig/network
|
|
|
|
# Check that networking is up.
|
|
[ ${NETWORKING} = "no" ] && exit 0
|
|
|
|
# Get config.
|
|
[ -r /etc/sysconfig/krb5kdc ] && . /etc/sysconfig/krb5kdc
|
|
|
|
# Source function library.
|
|
. /etc/rc.d/init.d/functions
|
|
|
|
RETVAL=0
|
|
prog="Kerberos 5 KDC"
|
|
krb5kdc=/usr/kerberos/sbin/krb5kdc
|
|
|
|
# Sheel functions to cut down on useless shell instances.
|
|
start() {
|
|
echo -n $"Starting $prog: "
|
|
daemon ${krb5kdc} ${KRB5REALM:+-r ${KRB5REALM}} $KRB5KDC_ARGS
|
|
RETVAL=$?
|
|
echo
|
|
[ $RETVAL = 0 ] && touch /var/lock/subsys/krb5kdc
|
|
}
|
|
stop() {
|
|
echo -n $"Stopping $prog: "
|
|
killproc ${krb5kdc}
|
|
RETVAL=$?
|
|
echo
|
|
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/krb5kdc
|
|
}
|
|
reload() {
|
|
echo -n $"Reopening $prog log file: "
|
|
killproc ${krb5kdc} -HUP
|
|
RETVAL=$?
|
|
echo
|
|
}
|
|
|
|
# See how we were called.
|
|
case "$1" in
|
|
start)
|
|
start
|
|
;;
|
|
stop)
|
|
stop
|
|
;;
|
|
restart)
|
|
stop
|
|
start
|
|
;;
|
|
reload)
|
|
reload
|
|
;;
|
|
status)
|
|
status ${krb5kdc}
|
|
RETVAL=$?
|
|
;;
|
|
condrestart)
|
|
if [ -f /var/lock/subsys/krb5kdc ] ; then
|
|
stop
|
|
start
|
|
fi
|
|
;;
|
|
*)
|
|
echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}"
|
|
RETVAL=1
|
|
;;
|
|
esac
|
|
|
|
exit $RETVAL
|