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