Thanks Thanks:  2
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 15 of 23

Thread: Script restart CCcam cind CCcam-ul este blocat

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Standard RSP member zozo1's Avatar
    Join Date
    16 Feb 2009
    Location
    Bucuresti
    Posts
    111
    Mentioned
    0 Post(s)
    Rep Power
    0

    Default Script restart CCcam cind CCcam-ul este blocat

    Se deschide o sesiune noua de telnet pe dreambox(daca nu aveti client de telnet se poate folosi cel din Dreambox Control Center).

    Se ruleaza comenzile de mai jos(pe rand):
    Code:
    touch /usr/script/CCcamMonitor.sh
    chmod 0755 /usr/script/CCcamMonitor.sh
    Cu orice client de ftp se editeaza fisierul /usr/script/CCcamMonitor.sh (ex: click dreapta pe fisier in Dreambox Control Center si apoi Edit):
    Code:
    #!/bin/sh
    if ps x |grep -v grep |grep -c CCcam_2.1.0 >/dev/null
    then
    if wget http://root:password@192.168.0.14:16001
    then
    rm /var/script/index.html
    echo "$(date +%d-%m-%Y_%H:%M:%S) CCcam ok." >> /var/log/CCcam_check.log
    else
    echo "$(date +%d-%m-%Y_%H:%M:%S) CCcam restarted." >> /var/log/CCcam_check.log
    /var/script/CCcam_2.1.0_newcs_1.65_cam.sh stop
    /var/script/CCcam_2.1.0_newcs_1.65_cam.sh start
    fi
    else
    echo "$(date +%d-%m-%Y_%H:%M:%S) CCcam restarted." >> /var/log/CCcam_check.log
    /var/script/CCcam_2.1.0_newcs_1.65_cam.sh stop
    /var/script/CCcam_2.1.0_newcs_1.65_cam.sh start
    fi
    Atentie in scriptul de mai sus trebuie introduse IP dreamului, user si parola din CCcam.cfg. In script este trecut CCcam_2.1.0_newcs_1.65_cam.sh dar la fel de bine se poate porini oricare din cam-uri(vezi lista in /usr/script ).
    In momentul asta se poate testa oricand scriptul (se scimba CAM in Common Interface din Blue Panel) si in telnet se introduce:
    Code:
    /usr/script/CCcamMonitor.sh
    Daca totul este ok ar trebui sa lanseze CCcamd(la mine dureaza 90 de secunde, deci rabdare). Rezultatul se poate vedea si in fisierul /var/log/CCcam_check.log

    Daca totul este ok pana acum se poate trece la adaugarea scriptului in cron pt a rula automat la fiecare 10 minute (sau orice interval va convine).
    1) Blue Panel
    2) Serives / Daemons
    3) Cron -> Setup -> New
    4) Se selecteaza la cate minute se ruleaza scriptul
    5) Se merge la Command si se apasa Ok
    6) Se selecteaza din lista CCcamMonitor.sh si se apasa pe butonul verde
    7) Save si Exit
    Atentie: cron trebuie sa fie in starea started in lista de Services / Daemons.
    De acum se poate oricand urmari functionarea scriptului verificand fisierul /var/log/CCcam_check.log cu ajutorul DreamBox Control Center.

    Scriptul este testat pe Dreambox deci nu am idee daca functioneaza si pe cardservere facute pe PC cu Linux.
    Imaginea testata Gemini 4.50/4.60, ar trebui sa functioneze pe orice imagine cu conditia sa se modifice path-urile la fisierele de configurare.
    Cam-ul folosit este CCcam 2.1.0/NewCS 1.65

  2. #2
    Banned
    Join Date
    12 Aug 2008
    Location
    In fata calculatorului
    Posts
    250
    Mentioned
    0 Post(s)
    Rep Power
    0

    Default mda ...fain

    here is the guide for Gemini 4.2!!

    Prepare this file in notepad and save it as ccheck.sh

    #!/bin/sh
    if ps x |grep -v grep |grep -c CCcam >/dev/null
    then
    echo "cccam... ok"
    else
    echo "cccam... restarting"
    /var/bin/CCcam_2.0.9 &
    fi


    ftp the mentioned file to the dreambox into /var/script

    set the file attributes to 755.

    When the file is sent all must be done in the dm menu, so follow below steps:

    1. Press Blue button
    2. Press Extra/Setup
    3. Press Services/Daemon
    4. goto Crond section and press Setup
    5. Press New
    6. Now you have to decide how frequent you want this script to run example every 30mins ( In this case make sure you only have 30 in the minutes section)
    7. go on the last line Command and press ok ( A selection window should open)
    8. Select the script from the list, in this case you should look for ccheck.sh or whatever name you used earlier to save it. press ok when you find the script and should return to the previous menu.
    9. Press Save once more and then exit.
    10. if all was done ok it should check if CCcam is running and if not it will start it for you!! You can test this by changing to common interface and wait for the ammount of minutes you specified earlier.

    Good Luck !!!

  3. #3
    Standard RSP member tod1975's Avatar
    Join Date
    02 Jun 2008
    Posts
    205
    Mentioned
    0 Post(s)
    Rep Power
    0

    Default

    Salut ,ati incercat careva daca functioneaza pe Nabilo ,vad ca aici avem exemplu doar pentru Gemini.

  4. #4
    Member Beginner mirceaTM's Avatar
    Join Date
    02 Feb 2009
    Posts
    16
    Mentioned
    0 Post(s)
    Rep Power
    0

    Default

    Pe Nabilo nu merge pentru ca ii lipseste Cron!!

  5. #5
    Old Member mondo's Avatar
    Join Date
    31 Jan 2007
    Location
    Romania
    Posts
    2,431
    Mentioned
    38 Post(s)
    Rep Power
    88

    Default

    Este inclus in imagine scriptul de reboot la Nabilo.

  6. #6
    Member Beginner mirceaTM's Avatar
    Join Date
    02 Feb 2009
    Posts
    16
    Mentioned
    0 Post(s)
    Rep Power
    0

    Default

    Si unde trebuie sa intru pe dm sa setez scriptu? mersi

  7. #7
    Member Visitor
    Join Date
    10 Feb 2010
    Posts
    7
    Mentioned
    0 Post(s)
    Rep Power
    0

    Cool CCcam_check.log

    Quote Originally Posted by zozo1 View Post

    Atentie: cron trebuie sa fie in starea started in lista de Services / Daemons.
    De acum se poate oricand urmari functionarea scriptului verificand fisierul /var/log/CCcam_check.log cu ajutorul DreamBox Control Center.

    Pana la cate randuri ajunge fiserul CCcam_check.log? Nu este problema pt dm ca va creste fisierul si va manca din spatiu?

  8. #8
    Super Member
    Join Date
    15 May 2007
    Posts
    686
    Mentioned
    0 Post(s)
    Rep Power
    66

    Default

    O intrebare: cum adaug o linie in crond, astfel ca sa-mi rebooteze (nu restart) decodorul la o ora sau la doua ore? (in continuu, adica la fiecare 2 ore, decodorul sa rebooteze)
    am probleme cu router-ul, sau poate cu deocodorul, si la cam o ora se pierde legatura router->decodor, si, dupa un reboot al deodorului, totul e ok.

    deci, cine poate sa-mi zica?

  9. #9
    Member Addicted Member
    Join Date
    11 Feb 2007
    Location
    Șoseaua Kiseleff nr. 10
    Posts
    2,498
    Mentioned
    5 Post(s)
    Rep Power
    81

    Default

    Care e diferenta dintre reboot si restart?

  10. #10

    Join Date
    14 Feb 2007
    Posts
    1,089
    Mentioned
    0 Post(s)
    Rep Power
    0

    Default

    Incerca sa faci un fisier nume_script.sh cu urmatorul continut:
    Code:
    #!/bin/sh
    wget -O /dev/null http://root:pass_DM@localhost/cgi-bin/admin?command=reboot
    se pune scriptul in receptor in folderul script sau bin cu atribut 755

    Cu un editor de text se face un fisier cu urmatorul continut:
    Code:
    */120 * * * * /Calea_script/nume_script.sh
    
    sau asa :
    
    00 0,2,4,6,8,10,12,14,16,18,20,22 * * * /Calea_script/nume_script.sh
    denumim fisierul root si il punem in var/spool/cron/crontabs (depinde de receptor E1 sau E2, de imagine...etc)
    Verificam sa fie Enable Crond bifat (si aici depinde de imagine...etc)

    Sau .... setarea la o anumita ora si data a lunii

    In telnet se mai poate rula comanda:
    crontab -e
    In fisierul creat (var/spool/cron/ ) se adauga linia
    0 0 * * * root reboot
    aceasta linie face ca receptorul sa se restarteze la 24 de ore

    Semnificatia liniei din crontab
    Code:
    *     *     *   *    *        Comanda executata (reboot sau standby)
    -     -     -   -    -
    |     |     |   |    |
    |     |     |   |    +------> Zi a saptamanii (0 - 6) (Duminica=0)
    |     |     |   +----------> Luna (1 - 12)
    |     |     +-------------> Zi a lunii (1 - 31)
    |     +------------------> Ora (0 - 23)
    +-----------------------> Minut (0 - 59)

  11. #11
    Super Member
    Join Date
    15 May 2007
    Posts
    686
    Mentioned
    0 Post(s)
    Rep Power
    66

    Default

    Multumesc dMd, am sa incerc!

    Quote Originally Posted by zappa View Post
    Care e diferenta dintre reboot si restart?
    din cate am vazut eu, "reboot" e echivalent cu scoaterea si punerea in priza a receptorului, adica se reinitializeaza decodorul, pornind de la bootloader (cred )
    la "restart enigma", se pare ca reporneste doar emulatorul.

    mie routerul imi recunoaste decodorul doar dupa reboot.

    sper sa mearga !

  12. #12
    Standard RSP member Diablo1's Avatar
    Join Date
    29 Mar 2009
    Location
    Austria - TM
    Posts
    1,869
    Mentioned
    0 Post(s)
    Rep Power
    70

    Default

    Quote Originally Posted by zappa View Post
    Care e diferenta dintre reboot si restart?
    Limba

  13. #13
    Member Visitor
    Join Date
    22 Apr 2010
    Location
    Bucuresti
    Posts
    9
    Mentioned
    0 Post(s)
    Rep Power
    0

    Default

    va rog mult, cine ma poate ajuta cu un DM500 HD care nu mai booteaza si cand booteaza pierde CCcam-ul ...
    DM 500 HD, 1,3m Offset-3 LNB Black Ultra, 1,2m Offset-3 LNB Black Ultra, 0,85m Offset-1 LNB Black Ultra

  14. #14
    Banned
    Join Date
    12 Aug 2008
    Location
    In fata calculatorului
    Posts
    250
    Mentioned
    0 Post(s)
    Rep Power
    0

    Default

    am pus asa
    in var script un fisier numit check.e1-cccam_userscript
    in el am pus
    #! /bin/sh
    if ps | grep -v grep | grep -c CCcam_2.1.1 >/dev/null
    then
    echo "CCcam OK"
    else
    echo "CCcam blocat"
    echo "Se restarteaza CCcam"
    /var/bin/CCcam_2.1.1
    fi



    am dat atribut 755
    am pus crond la 10 minutes
    am observat ca functioneaza
    problema e ca fisierul temp o sa reduca spatiul din VAR
    ce ar trebui sa fac sa nu se intample asta?
    thx

Posting Permissions

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