#!/bin/sh
########################################
###### Powered by Vu+ Image Team ######
## http://www.vuplus-support.org ##
########################################
CAMNAME="OScam 1.20 rev: 11716"
remove_tmp () {
rm -rf /tmp/cainfo.* /tmp/camd.* /tmp/sc.* /tmp/*.info* /tmp/*.tmp* /tmp/oscam*
[ -e /tmp/.oscam ] && rm -rf /tmp/.oscam
[ -e /tmp/.emu.info ] && rm -rf /tmp/.emu.info
[ -e /tmp/oscam.mem ] && rm -rf /tmp/oscam.mem
}
case "$1" in
start)
echo "[SCRIPT] $1: $CAMNAME"
remove_tmp
touch /tmp/.emu.info
echo "OScam 1.20 rev: 11716" > /tmp/.emu.info
/usr/bin/oscam_1.20-unstable-11716 -b -r 2 -c /etc/tuxbox/config
;;
stop)
echo "[SCRIPT] $1: $CAMNAME"
kill `pidof oscam_1.20-unstable-11716`
remove_tmp
;;
restart)
$0 stop
sleep 2
$0 start
exit
;;
*)
$0 stop
exit 0
;;
esac
exit 0