#!/bin/sh
case "$1" in
start)
	ulimit -s 1024
	/usr/bin/oscamicamnew --wait 60 --config-dir /etc/tuxbox/config/oscamicamnew --daemon --pidfile /tmp/oscamicamnew.pid --restart 2
	;;
stop)
	kill `cat /tmp/oscamicamnew.pid` 2> /dev/null
	# in case a normal stop failed
	killall /usr/bin/oscam-emu
	;;
restart|reload)
	$0 stop
	$0 start
	;;
version)
	echo "gitAUTOINC+ed55b9cf44"
	;;
info)
	echo "oscamicamnew gitAUTOINC+ed55b9cf44"
	;;
*)
	echo "Usage: $0 start|stop|restart"
	exit 1
	;;
esac
exit 0
