Thanks Thanks:  1
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4

Thread: Script for checking CCcam status

  1. #1
    Standard RSP member
    Join Date
    13 Feb 2007
    Location
    Earth
    Posts
    1,977
    Mentioned
    0 Post(s)
    Rep Power
    76

    Post Script for checking CCcam status

    '' This script will work on most linux dist. including enigma1/2.
    The script will check if the CCCam proccess are running with a crontab and restart CCcam if stopped for some reason.

    Make a file called checkcccam.sh and place it under /bin. chmod with 755 and paste this into the file:

    #!/bin/bash
    CCCAM_CONFIG_FILE_PATH="/etc"
    CCCAM_EXECUTABLE_PATH="/bin"
    NAME_OFF_CCCAM_EXECUTABLE="CCcam.x86"
    #
    function Check_CCcam {
    ps -eo comm,pid,etime > tmpcat
    PID=$(grep -i $NAME_OFF_CCCAM_EXECUTABLE tmpcat | awk -F" " '{ print $2}')
    TIME=$(grep -i $NAME_OFF_CCCAM_EXECUTABLE tmpcat | awk -F" " '{ print $3}')
    }
    #
    Check_CCcam
    if [ "$PID" = "" ]; then
    cd $CCCAM_EXECUTABLE_PATH
    ./$NAME_OFF_CCCAM_EXECUTABLE -C $CCCAM_CONFIG_FILE_PATH/CCcam.cfg
    fi
    exit 0


    Modify the 3 lines marked with red to fit your local settings for paths and name of cccam file.

    Then make a crontab to run this script every 1 min.:

    # crontab -e

    Insert this line and save the file:
    * * * * * /bin/checkcccam.sh


    Try to kill your cccam process and check that it starts again in max. 1 min. ''
    Don't dream your life - live your DREAMbox ! DON'T FORGET TO SAY '' THANKS '' Note: Viewing Pay TV without a valid subscription is illegal All the files available here are kept for experimental and educational purpose only!

  2. #2
    Standard RSP member delta2k2's Avatar
    Join Date
    11 Apr 2008
    Location
    Fost mebru
    Posts
    2,523
    Mentioned
    0 Post(s)
    Rep Power
    78

    Default Re: Script for checking CCcam status

    Funcţionează la cineva acest script ?

    .
    Fost membru al acestui forum

  3. #3
    Member Visitor
    Join Date
    10 Aug 2008
    Posts
    2
    Mentioned
    0 Post(s)
    Rep Power
    0

    Default

    Hi
    I use Cccam 2.1.4 to DM 800 ( Orginal)with Gemini 5.0 and DreamEite 13 Image,
    can you Write a sample Instead of red setting, please?
    CCCAM_CONFIG_FILE_PATH="/etc"
    CCCAM_EXECUTABLE_PATH="/bin"
    NAME_OFF_CCCAM_EXECUTABLE="CCcam.x86"
    Best regards

  4. #4
    Standard RSP member franta's Avatar
    Join Date
    24 Jun 2009
    Location
    Hamburg
    Posts
    1,430
    Mentioned
    3 Post(s)
    Rep Power
    64

    Default script restart pt E2 folosit pe BH 1.7.9

    Daca mai are nevoie cineva de un script care sa verifice si sa dea restart la CCcam in caz in care e nevoie, eu pe BH folosesc scriptul urmator denumit ccheck.sh si plasat in
    /usr/script
    #!/bin/sh
    if ps x |grep -v grep |grep -c CCcam >/dev/null
    then
    echo "cccam... ok"
    else
    echo "cccam... restarting"
    /usr/bin/CCcam
    fi
    Se adauga liniade mai jos in fisieru root si bh.cron aflate in /etc/bhcron/
    */5 * * * * /usr/script/ccheck.sh
    Last edited by franta; 19-12-12 at 22:18.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •