DM800 HD Script help plz!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • saracen13
    Newbie
    • Jan 2010
    • 4

    #1

    DM800 HD Script help plz!

    Hi there!
    I have a DM800HD and I wish to keep log of the service selected (only service, not provider) every one minute.
    I searched a bit and I found out that if I telnet at dreambox http://127.0.0.1/web/subservices returns an XML file that lists the service currently playing. So I made a (noob) script that records for 8 hours total the services played. The sh file goes like this:

    Code:
    wget --output-document=1 http://127.0.0.1/web/subservices
    
    sleep 60 # wait 60 second
    
    wget --output-document=2 http://127.0.0.1/web/subservices
    
    sleep 60 # wait 60 second
    
    wget --output-document=3 http://127.0.0.1/web/subservices
    
    sleep 60 # wait 60 second
    .....
    and so on for 600 times (lame I know....)

    It basically creates a file with a number as file name (incremental) and it stores it in the DM memory.

    Can someone help me make it more sophisticated than that so that it never stops recording every 1 minute the service selected at the time? And where do I need to store this sh file so that it gets executed automatically when the dreambox boots up?? Right now I need to have a PC turned on in order to do this with putty and the xml files get stored at ./home/root of dreambox

    PLease hep me make this proper or please advice me on other means to have a log of services selected (I use CCcam as a client).
    Thanks for help in advance!
  • IAmATeaf
    DK Veteran
    • Mar 2011
    • 591

    #2
    You could put it in as a cron job to run every minute, I'd avoid putting sleeps in the script as it will consume CPU time.

    Comment

    • saracen13
      Newbie
      • Jan 2010
      • 4

      #3
      Thanks for replying!
      Great idea, however it would overwrite the same XML file again and again while my intention is to keep a log on the services currently played by my dreambox.
      So it would be ideal to put in cron this:

      Code:
      wget --output-document=1 http://127.0.0.1/web/subservices
      However that would overwrite the file named "1" every minute so I would not have a log of the services....

      Comment

      • IAmATeaf
        DK Veteran
        • Mar 2011
        • 591

        #4
        Well why didn't you say so

        Use:

        wget --output-document=- http://127.0.0.1/web/subservices >> 1

        That will output to std out and the >> will redirect and append to said file

        Comment

        • saracen13
          Newbie
          • Jan 2010
          • 4

          #5
          OK I will try this!!!
          Many thanks I will return with post to inform if this works out!
          :-)

          Comment

          Working...