oscam.sh:
#!/bin/sh
OSD="Oscam -> config"
PID=`pidof oscam`
Action=$1
cam_clean () {
rm -rf /tmp/.oscam /tmp/oscam*
}
cam_handle () {
if test -z "${PID}" ; then
cam_up;
else
cam_down;
fi;
}
cam_down () {
killall -9 oscam
sleep 2
cam_clean
}
cam_up () {
/usr/bin/cam/oscam -S -c /etc/tuxbox/config &
}
if test "$Action" = "cam_res" ; then
cam_down
cam_up
elif test "$Action" = "cam_down" ; then
cam_down
elif test "$Action" = "cam_up" ; then
cam_up
else
cam_handle
fi
exit 0



Reply With Quote