Hello Guest, if you are reading this it means you have not registered yet. Please take a second, Click here to register, and in a few simple steps you will be able to enjoy our community and use our OpenViX support section.
Page 2 of 2 FirstFirst 12
Results 16 to 25 of 25

Thread: Script help

  1. #16
    Darmeth's Avatar
    Title
    Member
    Join Date
    May 2017
    Posts
    30
    Thanks
    2
    Thanked 8 Times in 4 Posts
    Code:
    echo 'PLEASE WAIT WHILE BOUQUETS ARE UPDATED'
    wget http://www.darmeth.com/downloads/Darmeth_Motor_45E-30W.zip -O /tmp/Darmeth_Motor_45E-30W.zip > /dev/null
    rm -rf /etc/enigma2/lamedb5 > /dev/null
    unzip -o /tmp/Darmeth_Motor_45E-30W.zip -d /etc/enigma2 > /dev/null
    wget -qO - http://127.0.0.1/web/servicelistreload?mode=0 > /dev/null
    echo 'CLEANING /tmp FOLDER'
    rm -rf /tmp/Darmeth_Motor_45E-30W.zip > /dev/null
    echo 'DARMETH BOUQUETS UPDATED'
    exit 0
    A couple of observations:

    1. sleep 1 or sleep 1s not accepted when running from the box. Return says 'Sleep: Invalid number '1'
    2. Init 3/4 not accepted when running from the box and behaves as if I’ve typed in: Init —help.
    3. Did edit via Dreamboxedit and no changes seen in bouquets until pressing the 'Restart Enigma2' button. (This has always been the case BTW)

    I’ve run the script from both the box and via Telnet and have seen the bouquet files update in /etc/enigma2. Init/restart/reboot has no effect on loading the new settings! FTP’d files from abu baniaz to /tmp and tried that; same effect.

    I’m on technomate twin-4k running 5.0.020

    So…why does this work for you guys but not me?! :-)

  2. #17
    ccs's Avatar
    Title
    ViX Beta Tester
    Join Date
    Sep 2014
    Posts
    5,836
    Thanks
    554
    Thanked 1,276 Times in 1,089 Posts
    sleep 1 works for me, as does init 3 or init 4 (I assume that is what you mean by 3/4).

    Looks like you are not creating a Linux file when modifying the script?

  3. #18
    Darmeth's Avatar
    Title
    Member
    Join Date
    May 2017
    Posts
    30
    Thanks
    2
    Thanked 8 Times in 4 Posts
    Adding here, please have a look. Thanks, ccs

    darmeth.zip

  4. #19
    ccs's Avatar
    Title
    ViX Beta Tester
    Join Date
    Sep 2014
    Posts
    5,836
    Thanks
    554
    Thanked 1,276 Times in 1,089 Posts
    I can't see any unwanted characters in the file, but the last line is missing a LF at the end, which may matter, but I'm not sure.

    All the sleeps are sleep 4, have you changed them or is this a different file?

  5. #20
    Darmeth's Avatar
    Title
    Member
    Join Date
    May 2017
    Posts
    30
    Thanks
    2
    Thanked 8 Times in 4 Posts
    Different file I sent (changed the sleep when I was running via Telnet. Script definately works and runs with no issues!!

    The only issue I have is why my settings don't update.

  6. #21
    Darmeth's Avatar
    Title
    Member
    Join Date
    May 2017
    Posts
    30
    Thanks
    2
    Thanked 8 Times in 4 Posts
    @ccs - thanks dude! Your comment about "not creating a Linux file" solved the issue. I forgot rule 101 - always transfer script files via FTP using BINARY mode. I feel like a dunce!

    Sleep works / init 4 / init 3 works / settings updated...finally!

    Thank you all for your patience and kind assistance.

  7. #22
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,769
    Thanks
    235
    Thanked 1,656 Times in 1,305 Posts
    Quote Originally Posted by Darmeth View Post
    @ccs - thanks dude! Your comment about "not creating a Linux file" solved the issue. I forgot rule 101 - always transfer script files via FTP using BINARY mode. I feel like a dunce!
    But a script file is an ASCII file, so you could also create it as a DOS file and transfer in ASCII mode.
    The actual rule is to transfer in the correct mode.

    Sleep works / init 4 / init 3 works / settings updated...finally!
    But the init command will also abort any recording in progress at the time.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  8. #23
    Darmeth's Avatar
    Title
    Member
    Join Date
    May 2017
    Posts
    30
    Thanks
    2
    Thanked 8 Times in 4 Posts
    Cheers Birdman. Long day! Was thinking 'always ASCII, never Binary' and typed that pile of garbage! Should read:

    always never transfer script files via FTP using BINARY mode.

  9. #24
    Darmeth's Avatar
    Title
    Member
    Join Date
    May 2017
    Posts
    30
    Thanks
    2
    Thanked 8 Times in 4 Posts
    Double-checking on previous post...ACSII technically is correct, as it is a text file, BUT, the lack of return carriage causes issues. SH files should definitely be FTP'd in BINARY mode if no '\n' is specified. I've retested using both ASCII and BINARY - ASCII file gives errors when script is run. BINARY mode works with no errors. ASCII will work if return carriage is specified in the script (which I did not on original).

  10. #25
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,769
    Thanks
    235
    Thanked 1,656 Times in 1,305 Posts
    Quote Originally Posted by Darmeth View Post
    Double-checking on previous post...ACSII technically is correct, as it is a text file, BUT, the lack of return carriage causes issues. SH files should definitely be FTP'd in BINARY mode if no '\n' is specified.
    They should be transferred as binary iff you have created then as Unix text file.
    If you've created them as Windows/DOS text files you'll need to use ASCII.

    (I don't have the issue as I'd create them on a Linux system if I didn't create them on the box itself in the first place).
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.