#!/bin/bash
#/var/emu/oscam/oscam.x86 -b -c /var/etc/oscam
#
CAMNAME="Oscam Server"
# end
# This method starts Oscam
start_cam ()
{
pkill -9 oscam.x86
sleep 2
/var/emu/oscam/oscam.x86 -b -c /var/etc/oscam &
}
# This method stops Oscam
stop_cam ()
{
pkill -9 oscam.x86
}
case "$1" in
start)
echo "[SCRIPT] $1: $CAMNAME"
start_cam
;;
stop)
echo "[SCRIPT] $1: $CAMNAME"
stop_cam
;;
restart)
echo "Restaring $CAMNAME"
stop_cam
sleep 7
start_cam
;;
*)
"$0" stop
exit 1
;;
esac
exit 0