auto restart oscam on dm500 server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • smoggie
    DK Veteran
    • Jul 2008
    • 863

    #1

    auto restart oscam on dm500 server

    Been trying to get this working but no luck
    using this script here
    #!/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/log/oscam.check
    nohup /var/bin/oscam >> /var/log/oscam.log &
    else
    echo "oscam is still OK!" >> /var/log/oscam.check
    fi

    I am using cccam2.1 & oscam 6359 on gemini image
    I have added the above script to var/script and set attributes to 755. I have went into blue panel>services/daemons and started crond. In set up I have added/var/script/OscamCheck.sh to run every 5 mins.
    Used a killall command to stop oscam but it has not restarted.Any help appreciated.
  • smoggie
    DK Veteran
    • Jul 2008
    • 863

    #2
    someon on forum must have some idea

    Comment

    • Rodbouy
      DK Veteran
      • Jul 2010
      • 1320

      #3
      Why do you want this or need this?

      If OScam is needing restarted from anything else other than a box crash then there is something wrong.

      Your adding to something as simplistic as OScam on a Dm500 when there is no need mate.

      What problems are you having?

      Comment

      • smoggie
        DK Veteran
        • Jul 2008
        • 863

        #4
        box is running gemini 4.7 ccam 2.13 & oscam 6539
        Sometimes oscam bottles it and stop working. The reason I want the script is so that it checks every 5 mins that oscam is working and if not it will start it.
        I intially added the script to var/script but tonight I have added it to var/bin as I think from my searching thats where it should go.
        I have went into blue panel and set up a new cron task var/bin/OscamCheck.sh to run every 5 mins

        Comment

        • Rodbouy
          DK Veteran
          • Jul 2010
          • 1320

          #5
          I have never used Yemeni but I would scrap cccam and use only oscam.

          Oscam in a dm500 runs sweet mate. Don't over complicate it with scripts and cccam etc.

          Keep it simple.

          I have never had a oscam stopping issue unless box freezes and crashes which is about 3 times in the last 3 years. Rare

          Comment

          • smoggie
            DK Veteran
            • Jul 2008
            • 863

            #6
            I guess its an option but I will then have to change my lines

            Comment

            • smoggie
              DK Veteran
              • Jul 2008
              • 863

              #7
              "I have never had a oscam stopping issue unless box freezes and crashes which is about 3 times in the last 3 years. Rare "

              Is that running oscam alone on a dm500 server?

              Comment

              • Rodbouy
                DK Veteran
                • Jul 2010
                • 1320

                #8
                Originally posted by smoggie
                "I have never had a oscam stopping issue unless box freezes and crashes which is about 3 times in the last 3 years. Rare "

                Is that running oscam alone on a dm500 server?

                Yes mate, you dont need to change the lines you have say in other boxes around the house shall we say, you just need to add the user pass details to OScam.user

                Then enable dvbapi in oscam.conf and the protocol that you are using in other boxes such as cccam or newcamd

                or you can use camd to connect boxes

                Comment

                • smoggie
                  DK Veteran
                  • Jul 2008
                  • 863

                  #9
                  conf

                  [global]
                  nice = -1
                  WaitForCards = 1
                  logfile = stdout
                  preferlocalcards = 1
                  saveinithistory = 1

                  [webif]
                  httpport = 8888
                  httpuser = admin
                  httppwd = admin
                  httpallowed = 127.0.0.1,192.168.0.0-192.168.255.255
                  # protocols

                  [newcamd]
                  key = 0102030405060708091011121314
                  port = 10001@0963:000000



                  # protocols
                  [cccam]
                  port = 12005 my forwarded port
                  reshare = 2
                  version = 2.1.3
                  stealth = 1



                  [dvbapi]
                  enabled = 1
                  user = test1
                  socket = /tmp/camd.socket
                  boxtype = dreambox
                  au = 1

                  user
                  [account]
                  user = test1
                  description = for local mgcamd or DVBAPI
                  pwd = test2
                  disabled = 0
                  uniq = 1
                  group = 1
                  au = skyuk
                  caid = 0963:000000

                  [account]
                  user = localdm1
                  description = for local mgcamd or DVBAPI
                  pwd = localdm2
                  disabled = 0
                  uniq = 1
                  group = 1
                  au = 0
                  caid = 0963:000000

                  How does this look?? So I now need to remove cccam from test1(server) along with the cfg file ans run oscam as cardserver. My box downstairs (localdm1) remains the same.

                  Comment

                  • Rodbouy
                    DK Veteran
                    • Jul 2010
                    • 1320

                    #10
                    oscam.conf

                    Code:
                    [global]
                    logfile = /var/log/oscam.log
                    disablelog = 0
                    disableuserfile = 0
                    usrfileflag = 0
                    clienttimeout = 5000
                    fallbacktimeout = 2500
                    clientmaxidle = 120
                    failbantime = 30
                    cachedelay = 120
                    bindwait = 120
                    netprio = 0
                    clientdyndns = 0
                    resolvedelay = 30
                    unlockparental = 0
                    nice = -1
                    serialreadertimeout = 1500
                    maxlogsize = 50
                    waitforcards = 1
                    preferlocalcards = 1
                    saveinithistory = 1
                    readerrestartseconds = 5
                    lb_mode = 1
                    lb_save = 0
                    lb_nbest_readers = 2
                    lb_nfb_readers = 1
                    lb_min_ecmcount = 5
                    lb_max_ecmcount = 500
                    lb_reopen_seconds = 900
                    resolvegethostbyname = 0
                    failbantime = 10
                    double_check = 1
                     
                     
                    [newcamd]
                    port                          = *****@CAID:000000
                    key                           = 0102030405060708091011121314
                    [cccam]
                    port                          = *****
                     
                    #below is for camd
                    [cs357x]
                    port                          = *****
                    # this needs to be ebabled so that the box will let you view channels the user must be same as an account in oscam.user.
                    [dvbapi]
                    enabled                       = 1
                    au                            = UK
                    boxtype                       = dreambox
                    user                          = Local
                    socket                        = /tmp/camd.socket
                    [webif]
                    httpport                      = 8888 #default
                    httpuser                      = user
                    httppwd                       = pass
                    httpcss                       = /var/tuxbox/config/light-blue-3d-V2.0.css
                    httpallowed                   = 127.0.0.1,192.168.1.102-192.168.1.104,192.168.1.105-192.168.1.120  # edit range to suit your network. or no access to webif
                    httphideidleclients           = 1
                    oscam.server

                    Code:
                     
                    [reader]
                    label                         = UK
                    protocol                      = internal
                    device                        = /dev/sci0
                    caid                          = CAID
                    detect                        = cd
                    mhz                           = 500
                    cardmhz                       = 500
                    ident                         = CAID:000000
                    group                         = 1
                    emmcache                      = 1,3,15
                    blockemm-unknown              = 1
                    blockemm-g                    = 1
                    lb_weight                     = 101
                    auprovid                      = 000CAID
                    oscam.user

                    Code:
                     
                    #sample with au
                    [account]
                    user                          = Room1
                    pwd                           = Room1Pass
                    group                         = 1
                    uniq                          = 3
                    au                            = UK  # if you want client to update card this must match reader label in oscam.server
                     
                    #No au
                    [account]
                    user                          = Room2
                    pwd                           = Room2Pass
                    group                         = 1
                    uniq                          = 3
                     
                     
                    # must match dvbapi in oscam.conf
                    [account]
                    user                          = Local
                    group                         = 1
                    au                            = UK
                    Now the boxes say in your home can still use their existing cccam cline for as long as the user pass port is same as oscam.user and port in oscam.conf

                    Oscam stable 1.10 but not sure what build they are on the now. Site seems to be down, not been on it for some time.

                    Comment

                    • smoggie
                      DK Veteran
                      • Jul 2008
                      • 863

                      #11
                      cheers for help Rodbouy, getting there slowly. I have added user account to oscam conf but I am getting timeout on the connection. User account is showing online.

                      Comment

                      • smoggie
                        DK Veteran
                        • Jul 2008
                        • 863

                        #12
                        will have a bash at it at the weekend again. Sure its just something simple vecause everythhing seems to be working bar getting pic on tv. Been having a look here http://www.digital-kaos.co.uk/forums...02/index3.html and reading your posts on page 7

                        Comment

                        • Rodbouy
                          DK Veteran
                          • Jul 2010
                          • 1320

                          #13
                          if its not clearing on box

                          make sure the dvbapi user s the same as a uer acc in oscam.user

                          this is the built in cam to clear in the box

                          Comment

                          • Rodbouy
                            DK Veteran
                            • Jul 2010
                            • 1320

                            #14
                            Did you manually install OScam ?

                            Comment

                            • smoggie
                              DK Veteran
                              • Jul 2008
                              • 863

                              #15
                              havent tried again but I didnt manually install oscam. I stopped cccam via blue panel and left only oscam running as cardserver. Typed in "ps" in telnet to confirm that only oscam was running. Will post back at the weekend. Cheers Rodbouy.

                              Comment

                              Working...