#!/bin/sh
CAMNAME="CCcam Server"
# end
# This method starts CCcam
start_cam ()
{
LD_PRELOAD=/usr/local/lib/cccam_ca.so /usr/local/bin/cccam &
sleep 2
}
# This method stops CCcam
stop_cam ()
{
pkill cccam
}
case "$1" in
start)
echo "[SCRIPT] $1: $CAMNAME"
start_cam
;;
stop)
echo "[SCRIPT] $1: $CAMNAME"
stop_cam
;;
restart)
echo "Restaring $CAMNAME"
stop_cam
start_cam
;;
*)
"$0" stop
exit 1
;;
esac
exit 0
