CCcam script Help

There are 13 replies in this Thread which was already clicked 7,370 times. The last Post () by hollander95.

  • Asking for help,
    I have installed cccam_install_package the Instructions that cam took the forum from youknowhoo and all I consumed 100% by uvom instructions, the problem is that I do not see cccamlog cccam.check, key update, configupdate.log, when you start to say hand on putyy this command / var / script / MoreCCcamCheck.sh then see the log file in var / cccamlog. Many times I start the server is the same problem. I use Ubuntu 8.04


    I beseech you look at the scripts, crontab and see if there are any error
    ---------------------------------------------------------------------------
    my contab:
    32 * * * * root cd / && run-parts --report /etc/cron.hourly
    2 1 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
    48 4 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
    23 4 12 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
    #



    54 03 * * * root /var/script/UserBackup.sh
    56 03 * * * root /var/script/MoreCCcamstop.sh
    57 03 * * * root /var/script/MoreConfigUpdate.sh >> /var/cccamlog/configupdate.log
    58 03 * * * root /var/script/keyupdater.sh
    59 03 * * * root /var/script/MoreCCcamstart.sh
    */1 * * * * root /var/script/MoreCCcamCheck.sh
    */3 * * * * root /var/script/oscamCheck.sh >>
    "03 04 * * 6 root /var/script/LogCleanUp.sh >> /var/cccamlog/CleanUp.log


    5,45 * * * * root /var/script/./illegal.sh >> /var/cccamlog/illegal.log 2>&1
    02 * * * * root wget -O - http://127.0.0.1/cron_update.php?p=1 >/dev/null 2>&1
    30 * * * * root wget -O - http://127.0.0.1/cron_ping.php?p=1 >/dev/null 2>&1


    My script:/var/script
    -----------------
    MoreCCcamCheck.sh
    ========================
    #!/bin/sh
    #this script is written By youknowhoo
    #i have added a part that checks if CCcam is responding like it should
    #that part is written by CC_share.
    #this way you can see if it was off(line) or froozen
    CHECKNAME="test.txt"
    IP="127.0.0.1"
    PORT="16001"
    OWNER=root
    process=`ps auxwww | grep CCcam_1.x86 | grep -v grep | awk '{print $1}'`
    if [ -z '$process' ]; then
    echo "Couldn't find CCcam_1.x86 running, Restarting CCcam" >> /var/cccamlog/cccam.check
    echo && date >>/var/cccamlog/cccam.check
    echo "chown owner nodeid"
    chown $root /tmp/.CCcam.nodeid
    echo "Removing nodeid and starting second CCcam"
    rm /tmp/.CCcam.nodeid && /usr/local/bin/CCcam_1.x86 -C /var/etc/CCcam_1.cfg
    else echo "CCcam process is present, now checking if CCcam is froozen" >> /var/cccamlog/cccam.check
    sleep 6
    echo info|nc $IP $PORT >>/tmp/test.txt
    set $(ls -s /tmp/test.txt)
    if [ '$1' = '0' ];
    then
    echo "CCcam is froozen, restarting CCcam" >>/var/cccamlog/cccam.check
    echo && date >>/var/cccamlog/cccam.check
    echo "chown owner nodeid"
    chown $OWNER /tmp/.CCcam.nodeid
    echo "Removing nodeid and starting second CCcam"
    rm /tmp/.CCcam.nodeid && /usr/local/bin/CCcam_1.x86 -C /var/etc/CCcam_1.cfg
    else
    echo "Cccam is responding like it should" >>/var/cccamlog/cccam.check
    fi
    rm /tmp/$CHECKNAME
    fi
    sleep 2
    CHECKNAME="test.txt"
    IP="127.0.0.1"
    PORT="15001"
    OWNER=root
    process=`ps auxwww | grep CCcam_2.x86 | grep -v grep | awk '{print $1}'`
    if [ -z '$process' ]; then
    echo "Couldn't find CCcam_2.x86 running, Restarting CCcam" >> /var/cccamlog/cccam.check
    echo && date >>/var/cccamlog/cccam.check
    echo "chown owner nodeid"
    chown $OWNER /tmp/.CCcam.nodeid
    echo "Removing nodeid and starting second CCcam"
    rm /tmp/.CCcam.nodeid && /usr/local/bin/CCcam_2.x86 -C /var/etc/CCcam_2.cfg
    else echo "CCcam process is present, now checking if CCcam is froozen" >> /var/cccamlog/cccam.check
    sleep 6
    echo info|nc $IP $PORT >>/tmp/test.txt
    set $(ls -s /tmp/test.txt)
    if [ '$1' = '0' ];
    then
    echo "CCcam is froozen, restarting CCcam" >>/var/cccamlog/cccam.check
    echo && date >>/var/cccamlog/cccam.check
    echo "chown owner nodeid"
    chown $OWNER /tmp/.CCcam.nodeid
    echo "Removing nodeid and starting second CCcam"
    rm /tmp/.CCcam.nodeid && /usr/local/bin/CCcam_2.x86 -C /var/etc/CCcam_2.cfg
    else
    echo "Cccam is responding like it should" >>/var/cccamlog/cccam.check
    fi
    rm /tmp/$CHECKNAME
    fi
    ========================
    MoreConfigUpdate.sh
    ---------------------------
    #!/bin/bash
    #Script to process new config and backup old one
    #Script designed and written by CC_Share
    SOURCE=/var/config
    TARGET=/var/etc
    FILE=CCcam_1.cfg
    BACKUPDIR=/var/backup
    CONFIGOLD=CCcam_1.old
    if test -f $SOURCE/$FILE ; then
    echo "New Config Present"
    if test -d $BACKUPDIR ; then
    if test -f $BACKUPDIR/$CONFIGOLD ; then
    echo "Removing OLD config file from backup directory"
    rm $BACKUPDIR/$CONFIGOLD
    else
    echo "No OLD config to remove."
    fi
    if test -f $BACKUPDIR/$FILE ; then
    echo "Renaming Backup to old config"
    cp $BACKUPDIR/$FILE $BACKUPDIR/$CONFIGOLD
    rm $BACKUPDIR/$FILE
    else
    echo "No Backupfile present yet"
    fi
    if test -f $TARGET/$FILE ; then
    echo "Copying Original config to Backup directory"
    cp $TARGET/$FILE $BACKUPDIR
    rm $TARGET/$FILE
    else
    echo "No Original Config File Present!?!?"
    fi
    else
    echo "Backup directory does not exist."
    echo "making new directory"
    mkdir $BACKUPDIR
    if test -f $TARGET/$FILE ; then
    echo "Copying Original config to Backup directory"
    cp $TARGET/$FILE $BACKUPDIR
    else
    echo "No Original Config File Present!?!?"
    fi
    fi
    echo "Moving New config file to "$TARGET
    cp $SOURCE/$FILE $TARGET
    rm $SOURCE/$FILE
    else
    echo "No New Config present, Nothing to process"
    fi
    SOURCE=/var/config
    TARGET=/var/etc
    FILE=CCcam_2.cfg
    BACKUPDIR=/var/backup
    CONFIGOLD=CCcam_2.old
    if test -f $SOURCE/$FILE ; then
    echo "New Config Present"
    if test -d $BACKUPDIR ; then
    if test -f $BACKUPDIR/$CONFIGOLD ; then
    echo "Removing OLD config file from backup directory"
    rm $BACKUPDIR/$CONFIGOLD
    else
    echo "No OLD config to remove."
    fi
    if test -f $BACKUPDIR/$FILE ; then
    echo "Renaming Backup to old config"
    cp $BACKUPDIR/$FILE $BACKUPDIR/$CONFIGOLD
    rm $BACKUPDIR/$FILE
    else
    echo "No Backupfile present yet"
    fi
    if test -f $TARGET/$FILE ; then
    echo "Copying Original config to Backup directory"
    cp $TARGET/$FILE $BACKUPDIR
    rm $TARGET/$FILE
    else
    echo "No Original Config File Present!?!?"
    fi
    else
    echo "Backup directory does not exist."
    echo "making new directory"
    mkdir $BACKUPDIR
    if test -f $TARGET/$FILE ; then
    echo "Copying Original config to Backup directory"
    cp $TARGET/$FILE $BACKUPDIR
    else
    echo "No Original Config File Present!?!?"
    fi
    fi
    echo "Moving New config file to "$TARGET
    cp $SOURCE/$FILE $TARGET
    rm $SOURCE/$FILE
    else
    echo "No New Config present, Nothing to process"
    fi
    exit
    ##################
    oscam script
    --------------
    #!/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/cccamlog/oscam.check
    nohup /usr/local/bin/oscam >> /var/cccamlog/oscam.log &
    else
    echo "oscam is still OK!" >> /var/cccamlog/oscam.check
    fi
    ===================


    UserBackup.sh
    ===========
    #!/bin/sh
    #this script is written By youknowhoo
    #this script is for monitor the clients/peers/servers
    #it makes a print from your server and each CCcam
    #it is using telnet so never give telnet a password or username!!
    #and never change telnet port!!
    IP="127.0.0.1"
    PORT="16001"
    echo && date >>/var/cccamlog/clients_1.txt
    echo info|nc $IP $PORT >>/var/cccamlog/clients_1.txt
    echo " "
    sleep 3
    echo clients|nc $IP $PORT >>/var/cccamlog/clients_1.txt
    echo " "
    sleep 3
    echo servers|nc $IP $PORT >>/var/cccamlog/clients_1.txt
    sleep 3
    echo "----------------------------------------------"
    IP="127.0.0.1"
    PORT="15001"
    echo && date >> /var/cccamlog/clients_2.txt
    echo info|nc $IP $PORT >>/var/cccamlog/clients_2.txt
    echo " "
    sleep 3
    echo clients|nc $IP $PORT >>/var/cccamlog/clients_2.txt
    echo " "
    sleep 3
    echo servers|nc $IP $PORT >>/var/cccamlog/clients_2.txt
    ====================
    kye update script
    ------------------
    wget -qO /var/keys/SoftCam.Key http://www.uydu.ws/deneme6.php?file=SoftCam.Key
    wget -qO /var/keys/AutoRoll.Key http://www.softcam.tv/deneme6.php?file=AutoRoll.Key


    =====================
    klenup script
    ------------
    #!/bin/sh
    # Script to cleanup log files
    # Script written by Youknowhoo.


    OWNER=root
    TARGETDIR_1=/tmp
    TARGETDIR_2=/var/cccamlog
    FILE_1=warning_1.txt
    FILE_2=warning_2.txt
    FILE_3=warning_3.txt
    FILE_4=cccam.check
    echo && date


    if test -f $TARGETDIR_1/$FILE_1 ; then
    echo "warning text 1 present!and removed"
    chown $OWNER $TARGETDIR_1/$FILE_1
    rm $TARGETDIR_1/$FILE_1
    else
    echo "No warning text present?!?!Nothing to remove"
    fi
    if test -f $TARGETDIR_1/$FILE_2 ; then
    echo "warning text 2 present!and removed"
    chown $OWNER $TARGETDIR_1/$FILE_2
    rm $TARGETDIR_1/$FILE_1
    else
    echo "No warning text 2 present?!?!Nothing to remove"
    fi
    if test -f $TARGETDIR_1/$FILE_3 ; then
    echo "warning text 3 present!and removed"
    chown $OWNER $TARGETDIR_1/$FILE_3
    rm $TARGETDIR_1/$FILE_1
    else
    echo "No warning text present?!?!Nothing to remove"
    fi
    if test -f $TARGETDIR_2/$FILE_4 ; then
    echo "Check File present!and removed"
    chown $OWNER $TARGETDIR_2/$FILE_4
    rm $TARGETDIR_2/$FILE_2
    else
    echo "No CCcam Check File present?!?! Nothing to remove"
    fi
    exit



    =================
    start cccam script
    --------------
    #!/bin/bash
    #Script to start more then one CCcam's with different nodeid
    #Script is written by Youknowhoo.
    OWNER=root
    echo "Starting first CCcam"
    /usr/local/bin/CCcam_1.x86 -C /var/etc/CCcam_1.cfg
    sleep 3
    echo "chown owner nodeid"
    chown $root /tmp/.CCcam.nodeid
    echo "Removing nodeid and starting second CCcam"
    rm /tmp/.CCcam.nodeid && /usr/local/bin/CCcam_2.x86 -C /var/etc/CCcam_2.cfg
    fi
    ===============
    stopcccam script
    -----------------
    #!/bin/bash
    #Script to stop all CCcam that are running.
    #Script written by Youknowhoo
    echo "stop first CCcam server"
    killall CCcam_1.x86
    echo "stop second CCcam server"
    killall CCcam_2.x86
    ++++++++++++++++++++++



    I'll be very happy if someone help me.

  • the whoknowho scripts wrriten by CC are not fully correct


    i had to re write them from scratch i have them working but they are designed for my PC only


    if you can pm me yr setup like where are your logs where is yr binary etc etc etc then i can write the script to work on yr machine


    the cron tabs i will adjust for you aswell so they are at a convenient time and run all commands


    btw i would advise installing ubuntu 10.10 server x86 thats what im runnign without any probs

  • script and other files


    Bin file {cccam and oscam} file in usr/local/bin atribut 755
    other oscam files in usr/local/etc atribut 755
    script in var/script atribut 755
    contrab in etc atribut 755
    log file in var/cccamlog atribut 755
    2x cccam1.cfg and 2 in var/etc
    other foldrrs like :backup,cccamlog,config,keys,script,www,etc in var/


    TKS
    dr key

  • Have you enabled debug mode in your cccam.cfg?


    Code
    DEBUG : yes



    SERVER LISTEN PORT :xxxxxxx
    ALLOW WEBINFO: yes
    ALLOW TELNETINFO:yes
    SHOW EXTENEDED CLIENT INFO : yes
    WEBINFO USERNAME :xxxxxxxxx
    WEBINFO PASSWORD :xxxxxxxxxxx
    WEBINFO LISTEN PORT : 16001
    TELNET LISTEN PORT : 16000
    SHOW TIMING : yes
    DEBUG : yes
    DISABLE EMM : yes
    EXTRA EMM LEVEL : no
    LOG WARNINGS : /tmp/warnings.txt
    PROVIDERINFO FILE : /var/etc/CCcam.providers
    CHANNELINFO FILE : /var/etc/CCcam.channelinfo
    SOFTKEY FILE : /var/keys/SoftCam.Key
    AUTOROLL FILE : /var/keys/AutoRoll.Key
    DVB API: -1
    MINIMUM DOWNHOPS : 1

    • Official Post

    I would install webmin, this is an easy way for you to manage your server, choose which logs run at startup & where they log to, even how often they are rotated.


    Tutorial - Installing Webmin On Ubuntu Server



    Or their is another auto install cccam package where the logs do work after install



    Automated Install Script for Ubuntu CCcam Server

  • in the morccamcheck skript
    the port 15000 is for :


    CHECKNAME="test.txt"
    IP="127.0.0.1"
    PORT="15000"
    for:


    WEBINFO LISTEN PORT : ?????
    TELNET LISTEN PORT :???????
    server port: ???


    plase infor me
    thenk



  • thenk you for help,
    i install fresh auto install cccam package from your link, only this auto install script have error in oscam section bicome link for auto install not work,and this cection i install manual.
    script for cccamcheck work ok, only i not see logo for update script. and userbeckup script,


    thenk you wery mach

    • Official Post

    thenk you for help,
    i install fresh auto install cccam package from your link, only this auto install script have error in oscam section bicome link for auto install not work,and this cection i install manual.
    script for cccamcheck work ok, only i not see logo for update script. and userbeckup script,


    thenk you wery mach


    You need to press the thanks button before you can download the attachment for the 2.1.3 package. if you are looking for oscam too use this one instead.


    HOW TO - CCcam+Oscam Automated Installation for Ubuntu

  • I'm getting all sorts of funnies with this script too. Can you please upload your modified version?


    I'm using run;


    lsb_release -a ; uname -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 11.10
    Release: 11.10
    Codename: oneiric
    Linux ubuntu 3.0.0-12-generic #20-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux



    Regards
    Underworld


CCcam Support Forum

Configs, discussion, downloads and guides for CCcam Softcam.

Participate now!

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