Upload the attached file to /var/script
Chmod oscamreboot.sh
For start:
For stop:
For restart:
PHP
# This method starts Oscam Server
start_cam ()
{
oscam -c /usr/local/etc/oscam -c /usr/local/etc/ &
sleep 2
}
stop_cam ()
{
killall -9 oscam
}
case "$1" in
start)
echo "[SCRIPT] $1: $CAMNAME"
start_cam
;;
stop)
echo "[SCRIPT] $1: $CAMNAME"
stop_cam
;;
restart)
echo "Restaring $CAMNAME"
stop_cam
start_cam
;;
*)
"$0" stop
exit 1
;;
esac
exit 0
Display More