#!/bin/sh

CAMNAME="OScam1.20-r8943"

remove_tmp () {
	rm -rf /tmp/*.info* /tmp/*.tmp* /tmp/*oscam*
}

case "$1" in
	start)
	echo "[SCRIPT] $1: $CAMNAME"
	remove_tmp
	/mnt/hdd0/program/bin/oscam -b -c /mnt/hdd0/program/tuxbox/config
	;;
	stop)
	echo "[SCRIPT] $1: $CAMNAME"
	killall -9 oscam 2 >/dev/null
	sleep 2
	remove_tmp
	;;
	*)
	$0 stop
	exit 0
	;;
esac

exit 0








