Display MoreHow to "Oscam check script"
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.
#!/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/log/oscam.check
nohup /usr/local/bin/oscam >> /var/log/oscam.log &
else
echo "oscam is still OK!" >> /var/log/oscam.check
fi
succesfully tested this under a linux environment and can confirm it works 100%.You must however ensure that your oscam binary is indeed located in /usr/local/bin. If it isnt amend the script accordingly. Just configure cron to run the script say every 5 minutes & voila
new2
Very new to linux so this might be a silly question.
when i try see if oscam is running I get this (using this in terminal)
ps ax | grep cam
1918 ? Ssl 0:03 /usr/local/bin/CCcam.x86
4188 ? S< 0:00 /usr/local/bin/oscam.x86
4189 ? S< 0:00 /usr/local/bin/oscam.x86
4190 ? S< 0:00 /usr/local/bin/oscam.x86
4191 ? S<l 0:15 /usr/local/bin/oscam.x86
4192 ? S<l 0:15 /usr/local/bin/oscam.x86
4196 ? S< 0:00 /usr/local/bin/oscam.x86
4197 ? S< 0:00 /usr/local/bin/oscam.x86
4198 ? S< 0:00 /usr/local/bin/oscam.x86
4199 ? S< 0:00 /usr/local/bin/oscam.x86
4200 ? S< 0:00 /usr/local/bin/oscam.x86
Does this mean there is more then one oscam running?