summaryrefslogtreecommitdiffstats
path: root/network/heimdal/config/rc.kdc
diff options
context:
space:
mode:
Diffstat (limited to 'network/heimdal/config/rc.kdc')
-rw-r--r--network/heimdal/config/rc.kdc34
1 files changed, 34 insertions, 0 deletions
diff --git a/network/heimdal/config/rc.kdc b/network/heimdal/config/rc.kdc
new file mode 100644
index 0000000000..3233794801
--- /dev/null
+++ b/network/heimdal/config/rc.kdc
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+kdc_start() {
+ if [ -x /usr/libexec/kdc ]; then
+ echo "Starting the kdc service: /usr/libexec/kdc --detach"
+ /usr/libexec/kdc --detach
+ fi
+}
+
+kdc_stop() {
+ killall kdc
+}
+
+kdc_restart() {
+ kdc_stop
+ sleep 1
+ kdc_start
+}
+
+case "$1" in
+ 'start')
+ kdc_start
+ ;;
+ 'stop')
+ kdc_stop
+ ;;
+ 'restart')
+ kdc_restart
+ ;;
+ *)
+ echo "Usage: $0 start|stop|restart"
+ ;;
+esac
+