Register

Welcome to the RDI-Board Community.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.


Donate Now Goal amount for this month: 100 EUR, Received: 100 EUR (100%)
Donate to support this site...

Page 1 of 3 123 LastLast
Results 1 to 15 of 35
  1. #1
    Junior Member Master
    RDI - Board Default Avatar

    Join Date
    Feb 2007
    Location
    Bucovina
    Posts
    68
    Posts Thanks / Likes

    Default CCcam Script de restart

    Am si eu nevoie de un script care sa reporneasca CCcam daca se blocheaza !
    Nu stiu ce se intimpla ca se blocheaza si daca nu dau restart la server nun mai porneste.
    Am CCcam 2.1.3 pe Ubuntu !

    Mersi !
    VU+Uno-DM7025-Fritz Box 7370, Antena-Multifed cu 8 lnb.

  2. #2
    Gold Member Expert
    Join Date
    Jan 1970
    Posts
    3,358
    Posts Thanks / Likes

    Default

    Schimbi path si numele cum e la tine ...si in crond o data la 5 min super suficient !

    #!/bin/bash
    CCCAM_CONFIG_FILE_PATH="/var/etc"
    CCCAM_EXECUTABLE_PATH="/root/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

  3. #3
    Junior Member Master
    RDI - Board Default Avatar

    Join Date
    May 2009
    Posts
    65
    Posts Thanks / Likes

    Default script restart

    Deschizi un terminal si creezi scriptul :

    nano /var/etc/checkcccam.sh

    in urmatoarea fereastra il inserezi:

    #!/bin/sh
    if ps x |grep -v grep |grep -c CCcam.x86 >/dev/null
    then
    echo "cccam... ok"
    else
    date=`date`
    echo "Restarting CCcam : $date" >> /tmp/checkCCcam.log

    echo "cccam... restarting"
    /var/bin/CCcam.x86 -dv >>/tmp/log.txt &
    fi

    Ctrl+x si confirmi cu y
    scriptului creeat ii dai permisiuni 755

    chmod 755 /var/etc/checkcccam.sh

    setezi un crond

    crontab -e

    inserezi :

    # m h dom mon dow command
    */1 * * * * /var/etc/./checkcccam.sh >>/tmp/checkcccam.log 2>&1
    3 3 * * * reboot

    Salvezi Ctrl+x si confirmi cu y
    In exemplul de mai sus CCcam este programat sa fie verificat din minut in minut si zilnic la ora 3.03 va face reboot
    Logurile le vei gasi in /tmp/checkcccam.log si /tmp/log.txt
    Succes
    Last edited by so-so; 12th March 2010 at 10:25.

  4. #4
    Unemployed Expert
    RDI - Board Default Avatar

    Join Date
    Jan 1970
    Location
    BeneluX
    Posts
    1,329
    Posts Thanks / Likes

    Default

    Ar trebui intai sa gasesti cauza care iti blocheaza cccam-ul.
    Pune aplicatia sa logheze si vezi apoi in log ce s-a intamplat

    start) /emu/cccam/CCcam.x86 -d >> /var/log/cccam.log &

    baFTA
    un server câteva receivere si ceva pasiune...

  5. #5
    Junior Member Master
    RDI - Board Default Avatar

    Join Date
    Feb 2007
    Location
    Bucovina
    Posts
    68
    Posts Thanks / Likes

    Default

    Multumesc la toti pentru raspuns, am sa incerc si dupa aia am sa postez ce am reusit sa fac, si daca merge.
    VU+Uno-DM7025-Fritz Box 7370, Antena-Multifed cu 8 lnb.

  6. #6
    Membrana Expert
    Join Date
    Aug 2005
    Location
    Tomis Nord
    Posts
    1,604
    Posts Thanks / Likes

    Default

    Eu am probat mai multe scripturi si in cele din urma m-am oprit la asta:
    Code:
     #!/bin/sh
    CHECKNAME="test.txt"
    IP="127.0.0.1"
    PORT="17000"
    echo info|nc $IP $PORT >>/tmp/$CHECKNAME
    set $(ls -s /tmp/$CHECKNAME)
    if [ "$1" = "0" ];
    then
    echo "CCcam is not running, Restarting..."
    /var/bin/CCcam restart
    else
    echo "CCcam is running"
    fi
    rm /tmp/$CHECKNAME
    exit
    unde portul 17000 este portul Telnetinfo.
    spersanutiiamulttimpsacitesticanuamsemnatura

  7. #7
    Junior Member Teacher
    RDI - Board Default Avatar

    Join Date
    Sep 2008
    Posts
    246
    Posts Thanks / Likes

    Default re

    se poate pune si direct in dm500 ?


  8. #8
    Junior Member Master
    RDI - Board Default Avatar

    Join Date
    Jan 2007
    Location
    mijlocul europei
    Posts
    77
    Posts Thanks / Likes

    Default

    @ roby63

    nu uita ca tu ai Ubuntu si

    nano /var/etc/checkcccam.sh

    trebuie scrisa

    nano /etc/checkcccam.sh

    iar asta asa:
    # m h dom mon dow command
    */1 * * * * /etc/./checkcccam.sh >>/tmp/checkcccam.log 2>&1
    3 3 * * * reboot


    Suna-ma cand te trezesti!




    Dreambox 600 PVR / Dreambox 800 HD/ Router Fritz 7170
    Nu stiu prea multe!

  9. #9
    Gold Member Expert
    Join Date
    Jan 1970
    Posts
    3,358
    Posts Thanks / Likes

    Default

    Quote Originally Posted by marcmsi View Post
    se poate pune si direct in dm500 ?
    asta merge in dm 500

    #!/bin/sh
    CHECKNAME="test.txt"
    IP="127.0.0.1"
    PORT="17000"
    echo info|nc $IP $PORT >>/tmp/$CHECKNAME
    set $(ls -s /tmp/$CHECKNAME)
    if [ "$1" = "0" ];
    then
    echo "CCcam is not running, Restarting..."
    /var/bin/CCcam restart
    else
    echo "CCcam is running"
    fi
    rm /tmp/$CHECKNAME
    exit

    schimbi portul si numele de la cccam (te uiti in consola cu comanda PS cum e numele la al tau )

  10. #10
    Junior Member Master
    RDI - Board Default Avatar

    Join Date
    Jan 2007
    Location
    mijlocul europei
    Posts
    77
    Posts Thanks / Likes

    Default CCcamLog.log

    In CCcamLog.log gasesc pe toti INDIVIZII care i-am "scos afara" si care nu mi-au scos C-linia incercand neantrerupt sa intre! Problema e ca e foarte greu sa iau iar contact cu acesti INDIVIZI neseriosi!

    Caut o modalitate prin care sa pot sa pot ignora din start acesti USERs si prin care sa ajung la und CCcamLog.log curat faca bad users!
    asa arata la mine in log un .... necinstit:

    illegal user wixxxxxxhom from 8x.x7.9x.2x3
    10:50:33.851 CCcam: kick 84.57.90.253, signature failed


    Aveti vre-o idee cum sa-i punem sau sa-i ignoraz din start Usermane ca sa nu mai deranjeze Serverul neantrerupt? Binenzeles fara sa schimb Portul CCcam din Router!
    Dreambox 600 PVR / Dreambox 800 HD/ Router Fritz 7170
    Nu stiu prea multe!

  11. #11
    Member Mentor
    RDI - Board Default Avatar

    Join Date
    Jun 2008
    Location
    82.7° N 114.4° W
    Posts
    991
    Posts Thanks / Likes

    Default

    Quote Originally Posted by playboy51 View Post
    In CCcamLog.log gasesc pe toti INDIVIZII care i-am "scos afara" si care nu mi-au scos C-linia incercand neantrerupt sa intre! Problema e ca e foarte greu sa iau iar contact cu acesti INDIVIZI neseriosi!

    Caut o modalitate prin care sa pot sa pot ignora din start acesti USERs si prin care sa ajung la und CCcamLog.log curat faca bad users!
    asa arata la mine in log un .... necinstit:

    illegal user wixxxxxxhom from 8x.x7.9x.2x3
    10:50:33.851 CCcam: kick 84.57.90.253, signature failed


    Aveti vre-o idee cum sa-i punem sau sa-i ignoraz din start Usermane ca sa nu mai deranjeze Serverul neantrerupt? Binenzeles fara sa schimb Portul CCcam din Router!
    Pui firewall.

  12. #12
    Junior Member Friend
    RDI - Board Default Avatar

    Join Date
    Nov 2009
    Posts
    25
    Posts Thanks / Likes

    Default pentru clienti stersi

    Cel mai sigur treci linia F: user parola 0 0 0 { 0:0:0}
    pentru cei care au fost clienti in server

  13. #13
    Junior Member Master
    RDI - Board Default Avatar

    Join Date
    Jan 2007
    Location
    mijlocul europei
    Posts
    77
    Posts Thanks / Likes

    Default

    Quote Originally Posted by lyvyus View Post
    Cel mai sigur treci linia F: user parola 0 0 0 { 0:0:0}
    pentru cei care au fost clienti in server

    La asta m-am gandit si eu dar cum ai scris si tu e ptr cei care AU FOST in server! Deci nu mai sunt... si nu-i mai am! Ca name user pot citi din LOG cu care incearca sa se login dar Passwd-ul nu-l am!
    Dreambox 600 PVR / Dreambox 800 HD/ Router Fritz 7170
    Nu stiu prea multe!

  14. #14
    Junior Member Master
    RDI - Board Default Avatar

    Join Date
    Jan 2007
    Location
    mijlocul europei
    Posts
    77
    Posts Thanks / Likes

    Default

    Quote Originally Posted by ibiza View Post
    Pui firewall.
    E usor de zis! Pe Suse am pus si eu candva ptr samba si apache o list cu ignor IP .... etc. Dar pe ubuntu in legatura cu CCcam ... nu stiu!

    PS: Sper sa nu te referi la firewall in Router!
    Dreambox 600 PVR / Dreambox 800 HD/ Router Fritz 7170
    Nu stiu prea multe!

  15. #15
    Member Mentor
    Join Date
    Dec 2003
    Location
    in canal,langa aurolaci
    Posts
    664
    Posts Thanks / Likes

    Default

    in router e cel mai beton sa ai firewall pt ca nici nu mai apuca sa ajunga pachetele la cccam dar si in server linux poti face acelasi lucru cu reguli "iptables"

    iptables -A FORWARD -s xxxx.dyndns.org -i eth0 -d 192.168.1.10 -p tcp --dport yyyyy -j REJECT

    iptables -A FORWARD -s 0/0 -i eth0 -d 192.168.1.10 -p tcp --dport yyyyy -j ACCEPT

    in acest exemplu la prima linie un anume DNS care intra pe WAN si e destinat IP-ului serverului intern 192.168.1.10 cu portul yyyyy va fi filtrat si Rejectat
    in a 2-a linie,dupa ce un anume DNS a fost filtrat sunt acceptate toate IP-urile (0/0) de pe interfata WAN catre IP intern si portul yyyyy (TCP)
    in loc de REJECT se poate pune si DROP , dar comanda reject trimite inapoi comanda celui care initiaza atacurile " host port unreachable" pe cand drop pur si simplu pierde doar pachetele nelasandu-le sa ajunga ;a IP-ul serverului intern
    daca ai conexiune ADSL prin PPPoe atunci pui in loc de eth0 pui ppp0

    Living an analog lifestyle in a digital world

 

 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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