Folks,
Good day. Have been going around in circles, trying to get a oscam / cccam check script working, as my oscam has been crashing twice a day at odd hours
I first tried the script that checks the "web interface" but when i run the script i get an error that "curl" does not exist. Not sure how to extract the curl file from the library, and which library, so instead am now trying the one that checks the process.
The script below doesn't seem to be working, because if i manually stop oscam, and then run the script oscam doesn't start up. The funny thing is if i run the four commands manually via telnet (kill oscam, kill cccam, start oscam, start cccam) , it works and oscam and cccam does start, but via the script it doesn't work
This is what i have so far
#!/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 killall CCcam_2.3.0 >> /var/log/oscam.log &
nohup killall oscam-v8a >> /var/log/oscam.log &
nohup oscam-v8a -b >> /var/log/oscam.log &
nohup CCcam_2.3.0 >> /var/log/oscam.log &
#sh /usr/script/Oscam_v8a_cs.sh
#sh /usr/script/CCcam_2.3.0_em.sh
else
echo "oscam is still OK!" >> /var/log/oscam.check
fi
Any help is appreciated
regards