choakem
28th April, 2012, 04:21 PM
Hi guys hopefully you can help...
I have a script that checks to see if OSCAM is running and restarts if required - this works fine.
Every now and again OSCAM will detect no card in my smargo card reader but continues to run normally and this is not detected by my current script. If I browse to http://server-ip:8888/graph.svg?type=servers then my card is detected as IDLE.
Is there a script to detect this IDLE state and restart OSCAM?
Any advice or help would be appreciated.
Here is my current oscam-check script.
!/bin/sh
process=`ps auxwww | grep oscam | grep -v grep | awk '{print $1}'`
if [ -z "$process" ]; then
echo "Couldn't find Oscam running. Restarting server-binary" >> /var/cccamlog/o$
echo && date >>/var/cccamlog/oscam.check
/usr/local/bin/oscam >> /var/cccamlog/Oscam.log &
else echo "Oscam_1.00 is still OK!" >> /var/cccamlog/oscam.check
fi
I have a script that checks to see if OSCAM is running and restarts if required - this works fine.
Every now and again OSCAM will detect no card in my smargo card reader but continues to run normally and this is not detected by my current script. If I browse to http://server-ip:8888/graph.svg?type=servers then my card is detected as IDLE.
Is there a script to detect this IDLE state and restart OSCAM?
Any advice or help would be appreciated.
Here is my current oscam-check script.
!/bin/sh
process=`ps auxwww | grep oscam | grep -v grep | awk '{print $1}'`
if [ -z "$process" ]; then
echo "Couldn't find Oscam running. Restarting server-binary" >> /var/cccamlog/o$
echo && date >>/var/cccamlog/oscam.check
/usr/local/bin/oscam >> /var/cccamlog/Oscam.log &
else echo "Oscam_1.00 is still OK!" >> /var/cccamlog/oscam.check
fi