i was trying to implement a script that checks the cccam if it runs ok
here is my attemp
#!/bin/sh
if ps x |grep -v grep |grep -c CCcam >/dev/null
then
#user and pass from the webinfo page.
if wget http://user:pass@192.168.1.10:16001
then
rm /emu/script/index.html
echo "ok"
else
echo "not ok"
/emu/script/cccam stop
/emu/script/cccam start
fi
else
echo "not ok"
/emu/script/cccam stop
/emu/script/cccam start
fi
you need to replace the user, pass and the ip to be the same as your webinfo information.
create a file calles checkcccam.sh
using emacs or any other editor.
then chmod 755 checkcccam.sh
and you are ready to go!
also the line for crontabl ppl.
*/15 * * * * /emu/script/checkcccam.sh >>/emu/log/checkcccam.log 2>&1
this will check the cccam server every 15 minutes.
if anyone can suggest anything please do so.
0 comments:
Post a Comment