summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-crypt/mit-krb5/files/mit-krb5kadmind.initd')
-rw-r--r--app-crypt/mit-krb5/files/mit-krb5kadmind.initd31
1 files changed, 31 insertions, 0 deletions
diff --git a/app-crypt/mit-krb5/files/mit-krb5kadmind.initd b/app-crypt/mit-krb5/files/mit-krb5kadmind.initd
new file mode 100644
index 000000000000..cb14afa20a3f
--- /dev/null
+++ b/app-crypt/mit-krb5/files/mit-krb5kadmind.initd
@@ -0,0 +1,31 @@
+#!/sbin/runscript
+
+#---------------------------------------------------------------------------
+# This script starts/stops the MIT Kerberos 5 Admin daemon
+#---------------------------------------------------------------------------
+
+daemon="MIT Kerberos 5 Admin daemon"
+exec="/usr/sbin/kadmind"
+
+opts="start stop restart"
+
+depend() {
+ need net mit-krb5kdc
+}
+
+start() {
+ ebegin "Starting $daemon"
+ start-stop-daemon --start --quiet --exec ${exec} 1>&2
+ eend $? "Error starting $daemon"
+}
+
+stop() {
+ ebegin "Stopping $daemon"
+ start-stop-daemon --stop --quiet --oknodo --exec ${exec} 1>&2
+ eend $? "Error stopping $daemon"
+}
+
+restart() {
+ svc_stop
+ svc_start
+}