Project

General

Profile

How to set capmt Connections to work with cccam » cccam.sh

script for start cccam - ovidiu marius, 2011-11-06 01:20

 
1
#!/bin/sh
2
CAMNAME="CCcam Server"
3
# end
4
# This method starts CCcam
5
start_cam ()
6
{
7
LD_PRELOAD=/usr/local/lib/cccam_ca.so /usr/local/bin/cccam &
8
sleep 2
9
}
10
# This method stops CCcam
11
stop_cam ()
12
{
13
pkill cccam
14
}
15
case "$1" in
16
start)
17
echo "[SCRIPT] $1: $CAMNAME"
18
start_cam
19
;;
20
stop)
21
echo "[SCRIPT] $1: $CAMNAME"
22
stop_cam
23
;;
24
restart)
25
echo "Restaring $CAMNAME"
26
stop_cam
27
start_cam
28
;;
29
*)
30
"$0" stop
31
exit 1
32
;;
33
esac
34
exit 0
(2-2/2)