updated on Sun Jan 22 08:00:21 UTC 2012
[aur-mirror.git] / kcrap / kcrap
blobd1bd2cbe0b029c7de26bbf6e29f5b75dcb4b077d
1 #!/bin/bash
3 # general config
4 . /etc/rc.conf
5 . /etc/rc.d/functions
7 PID=`pidof -o %PPID /usr/sbin/kcrap_server`
8 case "$1" in
9 start)
10 stat_busy "Starting Kerberos Challenge-Response Authentication Protocol server (KCRAP)"
11 if [ -z "$PID" ]; then
12 /usr/sbin/kcrap_server
14 if [ ! -z "$PID" -o $? -gt 0 ]; then
15 stat_fail
16 else
17 add_daemon kcrap
18 stat_done
21 stop)
22 stat_busy "Stopping Kerberos Challenge-Response Authentication Protocol server (KCRAP)"
23 [ ! -z "$PID" ] && kill $PID &> /dev/null
24 if [ $? -gt 0 ]; then
25 stat_fail
26 else
27 rm_daemon kcrap
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