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