As more and more peeps are required to take the plunge with oscam here is a simple script which will check to see if oscam is running.
If oscam has stopped running it will restart it automatically.


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/log/oscam.check
nohup /usr/local/bin/oscam >> /var/log/oscam.log &
echo "oscam is still OK!" >> /var/log/oscam.check
You must make sure that your oscam binary is indeed located in /usr/local/bin.
If it's not, adjust the script accordingly.

Now just configure cron to run the script say every 5 minutes.