updated on Sat Jan 14 12:12:45 UTC 2012
[aur-mirror.git] / capt / ccpd
blob5716f3fa44972492c27c3a1d4a2f6b1e64682cf3
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 DAEMON=/usr/sbin/ccpd
7 PID=`pidof -o %PPID ${DAEMON}`
9 export PATH=$PATH:/usr/local/sbin:/usr/local/bin
11 start ()
13 stat_busy "Starting CCPD"
15 [ -z "$PID" ] && ${DAEMON} 2>/dev/null
17 if [ $? -gt 0 ]; then
18 stat_fail
19 else
20 add_daemon ccpd
21 stat_done
25 stop ()
27 stat_busy "Stopping CCPD"
28 [ ! -z "$PID" ] && kill $PID &> /dev/null
29 if [ $? -gt 0 ]; then
30 stat_fail
31 else
32 rm_daemon ccpd
33 stat_done
37 case "$1" in
38 start)
39 start
41 stop)
42 stop
44 restart)
45 $0 stop
46 sleep 1
47 $0 start
50 echo "usage: $0 {start|stop|restart}"
51 esac
52 exit 0