Watchdog

#!/bin/sh
while sleep 2
do
  if ps x | grep -v grep | grep -c oscam >/dev/null
  then
    echo "oscam tourne déja"
  else
    echo ""
    date >> /tmp/oscam-crash.log
    echo "oscam ne tourne pas, oscam va être démarré" >> /tmp/oscam-crash.log
    killall -9 oscam >/dev/null
    sleep 1
    /usr/bin/oscam -b -c /etc/tuxbox/config
  fi
done