summaryrefslogtreecommitdiffstats
path: root/abs/core/heimdal/heimdal-kpasswd
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2014-10-27 20:28:27 (GMT)
committerBritney Fransen <brfransen@gmail.com>2014-10-27 20:28:27 (GMT)
commitf7b823f55a80b1498c30e9f3a47692a2329c4f09 (patch)
tree6de557714e6336282fbc0ab16c6578386dfc6654 /abs/core/heimdal/heimdal-kpasswd
parent4c2a2e3504f472628285a989c7c9a76be6855f54 (diff)
parent01c1a60f3b7f93b3ed7404196c2cf798c4d8c674 (diff)
downloadlinhes_pkgbuild-f7b823f55a80b1498c30e9f3a47692a2329c4f09.zip
linhes_pkgbuild-f7b823f55a80b1498c30e9f3a47692a2329c4f09.tar.gz
linhes_pkgbuild-f7b823f55a80b1498c30e9f3a47692a2329c4f09.tar.bz2
Merge branch 'testing'
Diffstat (limited to 'abs/core/heimdal/heimdal-kpasswd')
-rw-r--r--abs/core/heimdal/heimdal-kpasswd40
1 files changed, 40 insertions, 0 deletions
diff --git a/abs/core/heimdal/heimdal-kpasswd b/abs/core/heimdal/heimdal-kpasswd
new file mode 100644
index 0000000..9a7766d
--- /dev/null
+++ b/abs/core/heimdal/heimdal-kpasswd
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+# general config
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /opt/heimdal/sbin/kpasswdd`
+case "$1" in
+ start)
+ stat_busy "Starting Heimdal KDC"
+ if [ -z "$PID" ]; then
+ /opt/heimdal/sbin/kpasswdd &
+ fi
+ if [ ! -z "$PID" -o $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon heimdal-kpasswdd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Heimdal KDC"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon heimdal-kpasswdd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+ ;;
+esac
+exit 0