How to "Oscam check script"

There are 42 replies in this Thread which was already clicked 33,899 times. The last Post () by kiko2004.

  • How 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

    Dont forget to hit the thanks button!!!!!!!!!!!!!



    :41_002:



    Some articles may discuss topics that are illegal, so this information is provided for educational purposes only, your use of the content, downloads and files, or any part thereof, is made solely at your own risk and responsibility. Viewing Pay TV without a valid subscription is illegal. !! Linuxsat-Support.com cannot be held responsible for the content of any information stored or posted on this forum.

  • need to know the custom cron command to run this script, I get data.
    vu + I have the bin path is / usr / bin / oscam, the route is configured / etc / tuxbox / config / log path is / var / log / oscam.log


    I put the script in / usr / script /


    but not put in the cron blackhole on display the custom command, a help please. Order what you wear?




    Thank you.

    Pardon my language
    I love OSCam build by lareq78

  • the custom command would be file location of script along with the script name . Cron should also allow you to set timeframes of running the scripts etc


    new2

    Dont forget to hit the thanks button!!!!!!!!!!!!!



    :41_002:



    Some articles may discuss topics that are illegal, so this information is provided for educational purposes only, your use of the content, downloads and files, or any part thereof, is made solely at your own risk and responsibility. Viewing Pay TV without a valid subscription is illegal. !! Linuxsat-Support.com cannot be held responsible for the content of any information stored or posted on this forum.

  • thanks newtolinux.


    chekoscam my script will be called, ckeckoscam.sh and I will get on this path / usr / script /, I understand then the custom command is this:


    /usr/script/chekoscam.sh ?????


    Thank you.

    Pardon my language
    I love OSCam build by lareq78


  • The command is sh /usr/script/ckeckoscam.sh

    together we grow - ferdi

  • thanks newtolinux.
    chekoscam my script will be called, ckeckoscam.sh and I will get on this path / usr / script /, I understand then the custom command is this:
    /usr/script/chekoscam.sh ?????
    Thank you.
    ......................................
    so i just have one doubt in the above script is /usr/local/bin/oscam and my directory this is /usr/bin/oscam what is left as is or you change as my route?


    fogonero, you must edit the script and change from /usr/local/bin/ to /usr/bin/
    I should say that I am using a little different script

    together we grow - ferdi

  • edit: got! thanks thanks ferdi newtolinux Now I have this doubt:


    oscam.check grows the data that runs every five minutes, for example:


    oscam is still OK!
    oscam is still OK!
    oscam is still OK!
    oscam is still OK!
    oscam is still OK!


    How do I delete or limit in kbyte oscam.check not to grow?

    Pardon my language
    I love OSCam build by lareq78


  • the file is reset after each reboot, for this reason (and others) I suggest a reboot every 24 hours using the cron daemon

    together we grow - ferdi

  • i would not worry about oscam check script log file . it uses very little resource


    new2

    Dont forget to hit the thanks button!!!!!!!!!!!!!



    :41_002:



    Some articles may discuss topics that are illegal, so this information is provided for educational purposes only, your use of the content, downloads and files, or any part thereof, is made solely at your own risk and responsibility. Viewing Pay TV without a valid subscription is illegal. !! Linuxsat-Support.com cannot be held responsible for the content of any information stored or posted on this forum.

  • edit: for I have been a disappointment, as I have seen today has broken the server, I waited for the script and kept giving false oscam.check log, "is still oscam OK!" when it was not so, there if you can see the possible fault.


    ferdi you can put your script?



    Thank you.

    Pardon my language
    I love OSCam build by lareq78

  • hello friends
    This script looks at the process ps, a failure to uproot it:

    Code
    process=`ps auxwww | grep oscam | grep -v grep | awk '{print $1}'`
    if [ -z '$process' ]; then


    oscam often stops / hangs, but the process "ps" is still active, in fact in the webinfo is active, but in reality the server is off.


    the gentlemen teachers have if they could fix this problem.


    Thank you.

    Pardon my language
    I love OSCam build by lareq78

  • Hi, just moved to oscam myself, working nicely, script also up and running and seems to be working fine, as for oscam hanging and the process still running, came across another little script that may be useful.



    Obviously change paths to suit needs.


    [edit] just add a cronjob to check either script every 5 minutes


    */5 * * * * /usr/script/oscamcheck.sh


    Again change to suit needs.


    HTH

  • LFC4EVER thanks, my bin is in /usr/bin/


    So did you get then?



    thanks

    Pardon my language
    I love OSCam build by lareq78

  • my routes:


    bin=/usr/bin/
    logfile de oscam= /var/log/oscam.log
    script=/usr/script/checkoscam.sh











    this is the script I've posted, you see something wrong?


    Please keep me patience.


    Thank you

    Pardon my language
    I love OSCam build by lareq78

  • the hand with a stop killall - 9 oscam.


    I hope more than 5 minutes which is how I have the cron but I see it boots.
    I'm sure the cron is running:


    2764 root 416 S /usr/sbin/crond-c/etc/bhcron/


    just stopping it with a command is not responding??......works for you?


    as you do the test?

    Pardon my language
    I love OSCam build by lareq78

  • As mentioned mate, I'm new to the oscam setup and went with the OP script which appears to be working fine, if oscam is stopping but appears to be working I'd be inclined to check how many instances of oscam is running, and if on ubuntu server I'd be more inclined to change killall -9 oscam to simply killall oscam.


    Also going from my own research into oscam and how often it's released, bugs are usually found and need to be fixed, I built mines around 5070 in the end due to advice from a friend, I'm playing catchup due to using cccam for so long.


    Good Luck.

OSCam Support Forum

Configs, discussion, downloads and guides for OSCam Softcam.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!