oscam start/stop script

There is 1 reply in this Thread which was already clicked 5,047 times. The last Post () by s3n0.

  • i have 2 oscam bin files in usr/bin folder.one is running well with this script how to edit following script in order to run other bin as well
    not both in same time
    #!/bin/sh

    CAMNAME="OSCam 11546"

    remove_tmp () {
    rm -rf /tmp/*.info* /tmp/*.tmp*
    }

    case "$1" in
    start)
    echo "[SCRIPT] $1: $CAMNAME"
    remove_tmp
    /usr/bin/oscam -b &
    sleep 2
    ;;
    stop)
    echo "[SCRIPT] $1: $CAMNAME"
    killall -9 oscam 2>/dev/null
    sleep 1
    remove_tmp
    ;;
    *)
    $0 stop
    exit 0
    ;;
    esac

    exit 0




    if possible explain what is done with in each coding lines

  • LOL, so it doesn't work. This is the scripting language and the Linux shell respectively. You have to write what you don't understand and then can't explain it to you. It would take a long time to explain all the lines. You just need to learn how to use the Linux Shell (command-line) and then learn the POSIX syntax for writing Bash or Sh or other scripts :).


    If you knew at least the basics, you would know what to do. The start of your functional Oscam is on this line (the binary file is called the same - ie as "oscam"):

    /usr/bin/oscam -b &

    And it stops by hard blasting the service, on this line:

    killall -9 oscam 2>/dev/null


    Running a service like a daemon in the background using the character "&" at the end of the command is not the best solution, in my opinion. Correctly, Oscam as a daemon runs in the background via the argument "-b", so together:

    -b -r 2 -c /etc/tuxbox/config/oscam (of course, configuration path you can change as you need, or set to none)


    More info:

    http://www.streamboard.tv/wiki/OSCam/en/ShellCommands


    If you'd like, you can find my improved Oscam start script (folder "/etc/init.d") here:

    https://github.com/s3n0/e2scripts/raw/master/softcam


    It also depends on the distribution of the Enigma which you use, as the support of softcams or even the startup script itself may differ a bit (not always used to run such "init.d" script).


    Running another daemon is a bit of a long explanation. Editing and copying the start script (so caled "init.d" script) is not enough. After copying, renaming and modifying ("oscam" binary filename to "cccam" for example), you have to assign this script from the "/etc/init.d" folder to the run-level system.

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!