#!/bin/sh
#
# start/stop inetd super server.

if ! [ -x /usr/bin/oscam ]; then
	exit 0
fi

case "$1" in
    start)
	echo -n "Starting oscam:"
	/usr/bin/oscam &
	echo "."
	;;
    stop)
	echo -n "Stopping oscam:"
	killall oscam
	;;
    restart)
	echo -n "Restarting oscam:"
	killall oscam
	sleep 10
	/usr/bin/oscam &
	;;
    *)
	echo "Usage: /etc/init.d/oscam {start|stop|restart}"
	exit 1
	;;
esac

exit 0

