updated on Tue Jan 10 12:02:00 UTC 2012
[aur-mirror.git] / heimdal-aur / heimdal-kpasswd
blob9a7766d5b50d725db0eb6ad4449de96de929567d
1 #!/bin/bash
3 # general config
4 . /etc/rc.conf
5 . /etc/rc.d/functions
7 PID=`pidof -o %PPID /opt/heimdal/sbin/kpasswdd`
8 case "$1" in
9 start)
10 stat_busy "Starting Heimdal KDC"
11 if [ -z "$PID" ]; then
12 /opt/heimdal/sbin/kpasswdd &
14 if [ ! -z "$PID" -o $? -gt 0 ]; then
15 stat_fail
16 else
17 add_daemon heimdal-kpasswdd
18 stat_done
21 stop)
22 stat_busy "Stopping Heimdal KDC"
23 [ ! -z "$PID" ] && kill $PID &> /dev/null
24 if [ $? -gt 0 ]; then
25 stat_fail
26 else
27 rm_daemon heimdal-kpasswdd
28 stat_done
31 restart)
32 $0 stop
33 sleep 1
34 $0 start
37 echo "usage: $0 {start|stop|restart}"
39 esac
40 exit 0