#!/bin/sh

CAMNAME="Sbox0047-4/CCcam213"

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

case "$1" in
	start)
	echo "[SCRIPT] $1: $CAMNAME"
	remove_tmp
	/usr/bin/sbox.mips &
	sleep 7
	/usr/bin/CCcam &
	;;
	stop)
	echo "[SCRIPT] $1: $CAMNAME"
	killall -9 sbox.mips 2>/dev/null
	sleep 3
	killall -9 CCcam 2>/dev/null
	sleep 3
	remove_tmp
	;;
	*)
	$0 stop
	exit 0
	;;
esac

exit 0








