Welcome!

Welcome to Satlover forums, full of great people, ideas and excitement.

Please register if you would like to take part. link..

Register Now

Alert: Don't Use Hotmail Email Accounts for registration

Collapse

Before Access to all Forums and Trial accounts you must need to activate your account Email address

CCcam restart script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mihayll
    Junior Member
    • Dec 2010
    • 19

    CCcam restart script

    hi,please who can help me with a script for cccam restart when crashes ,
    used EDG Nemesis v2.2 image on dm 800 clone.please the script to be checked before posted on the forum.
  • mihayll
    Junior Member
    • Dec 2010
    • 19

    #2
    Re: CCcam restart script

    back with a request,if someone uses a script to restart CCcam for enigma 2 , and is verified,put him on the forum and tell me what picture use. thx

    Comment

    • mihayll
      Junior Member
      • Dec 2010
      • 19

      #3
      Re: CCcam restart script

      I found this script, who can help me with configuration?

      Note: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.

      Upload checkcccam.sh and place it under /bin. chmod with 755


      Modify these 3 lines inside checkccam.sh to fit your local settings for paths and name of cccam file:

      CCCAM_CONFIG_FILE_PATH="/etc"
      This is the path where your Cccam.cfg file are located

      CCCAM_EXECUTABLE_PATH="/bin"
      This is the path where your Cccam.ppc/Cccam.x86 file are located

      NAME_OFF_CCCAM_EXECUTABLE="CCcam.x86"
      This is the name of your Cccam bin.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.
      ------------------------------------------------------------------------------------------

      this is the script:


      #!/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

      ------------------------------------------------------------------------------------------
      PS.
      I do not understand what to change
      and how.

      Comment

      • jkr
        Member
        • Jun 2010
        • 87

        #4
        Re: CCcam restart script

        What do you not have understood?
        these three lines hate to be configured right for your box.
        You can do this on your pc befor uploading to box or later using an editor like vi.
        Originally posted by mihayll

        CCCAM_CONFIG_FILE_PATH="/etc"
        This is the path where your Cccam.cfg file are located

        CCCAM_EXECUTABLE_PATH="/bin"
        This is the path where your Cccam.ppc/Cccam.x86 file are located

        NAME_OFF_CCCAM_EXECUTABLE="CCcam.x86"
        This is the name of your Cccam bin.file.

        Comment

        • uttnls

          #5
          Re: CCcam restart script

          Originally posted by jkr
          What do you not have understood?
          these three lines hate to be configured right for your box.
          You can do this on your pc befor uploading to box or later using an editor like vi.
          It is a little tricky for enigma, and it depends a lot of used CAM or CAM combinations.

          Before you configure the lines indicated by that script and also by JKR you have first to identify where your CCcam.cfg is located, then the name of your binary file (sometimes called CCcam.x86 other times for example CCcam_2_2_1, depending on CAM or CAM combination you use), then the path to that binary file.

          Comment

          • jkr
            Member
            • Jun 2010
            • 87

            #6
            Re: CCcam restart script

            The location of the files can be easy discovered on every box but i see there 2 other problems:
            1. not on all system the cron is available/activated. Then you have to use a while loop.
            2. the output of ps is conditioned of the version of your busybox. It must be tested on your system.
            p.s.: i use oscam, it's much more stable so there is no need to observe it.

            Comment

            Working...