Duplicate instances of oscam starting up

There are 8 replies in this Thread which was already clicked 525 times. The last Post () by anniman.

  • I have 4 instances of oscam running at the same time how can I stop this from happening again
    standard scripts
    #!/bin/sh -e
    #
    # rc.local
    #
    # This script is executed at the end of each multiuser runlevel.
    # Make sure that the script will "exit 0" on success or any other
    # value on error.
    #
    # In order to enable or disable this script just change the execution
    # bits.
    #
    # By default this script does nothing.
    sleep 30
    /usr/local/bin/oscam -b
    exit 0



    and etc/crontab..


    # /etc/crontab: system-wide crontab
    # Unlike any other crontab you don't have to run the `crontab'
    # command to install the new version when you edit this file
    # and files in /etc/cron.d. These files also have username fields,
    # that none of the other crontabs do.


    SHELL=/bin/sh
    PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin


    # m h dom mon dow user command
    17 * * * * root cd / && run-parts --report /etc/cron.hourly
    25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
    47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
    52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
    #
    */5 * * * * root /var/script/oscam-checker.sh >/dev/null
    59 23 * * * root /var/script/oscam-backup.sh
    #38 6 * * * root /sbin/reboot

  • if you have 4 bins in the location rename them or delete, but have you a start/restart script?? as it maybe not closing all then restarting etc.


    try disable all cronjobs and see if you get 4 again restart 1 by 1 until the problem comes back.....

  • Quote

    I have 4 instances of oscam running at the same time how can I stop this from happening again


    If you are refering to the result of the process check I gave you

    Code
    ps x |grep -v grep |grep -c "oscam"


    It is normal to have 2, so 4 means that you have 2 instances running..




    Post oscam-checker.sh and wrap it in code..


    Here is a script I made for oscam checker that also removes duplicate oscam instances, it works a treat for me..
    BUT Before you change yours, post your oscam-checker.sh so I can see if I need to make any modifications..




    If this folder does not exist, change the /path/in/red to the folder you want to log to..


    Report back



    TF




    All your problems have been solved countless times before so try the search box before you post!!
    Please do not Request help by PM, use the main forum so Everyone can benefit from the answers.

    Edited once, last by thatfellow ().

  • You do have an oscam-checker & its running every 5 minutes according to your crontab


    Its located here:
    /var/script/oscam-checker.sh


    Please post it's contents as there were a few versions of that script in the auto installs..


    TF




    All your problems have been solved countless times before so try the search box before you post!!
    Please do not Request help by PM, use the main forum so Everyone can benefit from the answers.

  • doh!! i'm so stupid


    #!/bin/bash
    if ! ps x |grep -v grep |grep -c "oscam -b" >/dev/null
    then
    echo "ok - oscam seems running" && echo `date "+%d/%m/%y %R Starting oscam.."` >> /var/oscamlog/oscam.check
    oscam -b
    else
    echo "ok - oscam seems running" && echo `date "+%d/%m/%y %R Oscam was checked - Running OK"` >> /var/oscamlog/oscam.check
    fi

  • OK m8, thats fine, open up oscam-checker.sh
    located here:


    /var/script/oscam-checker.sh


    Delete all & drop in code from post #3
    Use WinSCP built in editor or notepad++ Do not use windows notepad or edit the text in any way..



    Then change this line in /etc/crontab

    Code
    */5 * * * * root /var/script/oscam-checker.sh >/dev/null


    to this

    Code
    */[COLOR='#FF0000']13[/COLOR] * * * * root /var/script/oscam-checker.sh >/dev/null


    (Changing the check script to run every 13 mins will dramatically reduce the chances of the check script running at the instant oscam starts up after reboot)



    After all this, your oscam check log will be:
    /var/oscamlog/oscam-check.log



    you can delete the old one:
    /var/oscamlog/oscam.check




    All your problems have been solved countless times before so try the search box before you post!!
    Please do not Request help by PM, use the main forum so Everyone can benefit from the answers.

  • anniman


    I assume by the flood of thankyou's :laugh: & the fact that you are not double logging on to my server that this issue has been resolved??




    All your problems have been solved countless times before so try the search box before you post!!
    Please do not Request help by PM, use the main forum so Everyone can benefit from the answers.

Participate now!

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