updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / heimdal-aur / heimdal-kadmind
blob9479b635effc60597b9546f3fb8fc4bebcaa16a1
1 #!/bin/bash
3 # general config
4 . /etc/rc.conf
5 . /etc/rc.d/functions
7 PID=`pidof -o %PPID /opt/heimdal/sbin/kadmind`
8 case "$1" in
9 start)
10 stat_busy "Starting Heimdal KDC"
11 if [ -z "$PID" ]; then
12 /opt/heimdal/sbin/kadmind &
14 if [ ! -z "$PID" -o $? -gt 0 ]; then
15 stat_fail
16 else
17 add_daemon heimdal-kadmind
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-kadmind
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