updated on Sun Jan 15 16:02:00 UTC 2012
[aur-mirror.git] / cccam-server / cccamd
blob2696ea13f0701d4b34ee1f4f34a2fe0abc9183a2
1 #!/bin/bash
3 # CCcam 2.0.9 - Cardsharing server
5 # Author: Peque
6 # Date: 22.10.2008
9 . /etc/rc.conf # include rc.conf scripts
10 . /etc/rc.d/functions # include functions script
12 PID=`pidof -o %PPID /usr/cccam/CCcam.x86`
13 # Starting the server
14 case "$1" in
15 start)
16 stat_busy "Starting CCcam-2.0.9 server"
17 /emu/cccam/CCcam.x86 -C /etc/CCcam.cfg &
18 if [ $? -gt 0 ];then
19 stat_fail
20 else
21 echo $PID > /var/run/cccam.pid
22 add_daemon cccamd
23 stat_done
26 stop)
27 stat_busy "Stopping CCcam-2.0.9 server"
28 [ ! -z "$PID" ] && kill $PID &> /dev/null
29 if [ $? -gt 0 ]; then
30 stat_fail
31 else
32 rm_daemon cccamd
33 stat_done
36 restart)
37 $0 stop
38 sleep 1
39 $0 start
42 echo "usage: $0 {start|stop|restart}"
43 esac
44 exit 0