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.
Results 1 to 15 of 25

Thread: Script help

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Darmeth's Avatar
    Title
    Member
    Join Date
    May 2017
    Posts
    30
    Thanks
    2
    Thanked 8 Times in 4 Posts
    Thanks all but still no joy with unzip. Modified code below. FTP'd to /usr/scripts and chmod to 755 and tried 777. I'm stopping on the unzip with "zip flags 1 and 8 are not supported". Re-tried with unrar and it works, with files extracting. I'm suspecting now something is amiss with BusyBox.

    Code:
    echo 'PLEASE WAIT WHILE BOUQUETS ARE UPDATED'
    sleep 3
    echo $LINE
    wget http://www.darmeth.com/downloads/Darmeth_Motor_45E-30W.zip -O /tmp/darmeth.zip > /dev/null
    echo 'DOWNLOAD COMPLETE'
    echo $LINE
    echo 'UNPACKING BOUQUETS'
    sleep 1
    unzip -o /tmp/darmeth.zip -d /etc/enigma2 > /dev/null
    wget -qO - http://127.0.0.1/web/servicelistreload?mode=0  > /dev/null
    sleep 1
    echo 'CLEANING /tmp FOLDER'
    rm -rf /tmp/darmeth.zip > /dev/null
    sleep 1
    echo $LINE
    echo 'RELOADING SERVICES - PLEASE WAIT'
    wget -qO - http://127.0.0.1/web/servicelistreload?mode=1 > /dev/null
    wget -qO - http://127.0.0.1/web/servicelistreload?mode=2 > /dev/null
    echo $LINE
    echo 'DARMETH BOUQUETS UPDATED'
    echo $LINE
    exit 0

  2. #2
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,823
    Thanks
    237
    Thanked 1,661 Times in 1,308 Posts
    Quote Originally Posted by Darmeth View Post
    Thanks all but still no joy with unzip. Modified code below. FTP'd to /usr/scripts and chmod to 755 and tried 777. I'm stopping on the unzip with "zip flags 1 and 8 are not supported". Re-tried with unrar and it works, with files extracting. I'm suspecting now something is amiss with BusyBox.
    The problem is in the zip file, so an issue with how it was created. [EDIT: probably something to do with the compression options]
    I get the same message for the download file.
    But if I unpack it on a Linux Mint system and create a new zip file, then copy that to the OpenVix box, all is OK.

    Now sure what $LINE was meant to be set to above, but here's a slightly simper version, with the locations parameterized at the top (easier to change).

    Code:
    #!/bin/sh
    # Darmeth 24-June-2017
    # Version 1.0
    
    src_uri="http://www.darmeth.com/downloads/Darmeth_Motor_45E-30W.zip"
    rld_uri="http://127.0.0.1/web/servicelistreload"
    
    echo 'PLEASE WAIT WHILE BOUQUETS ARE UPDATED'
    sleep 3
    echo
    wget -qO /tmp/darmeth.zip ${src_uri}
    echo 'DOWNLOAD COMPLETE'
    echo
    echo 'UNPACKING BOUQUETS'
    sleep 1
    unzip -qo /tmp/darmeth.zip -d /etc/enigma2
    wget -qO /dev/null "${rld_uri}?mode=0"
    sleep 1
    echo 'CLEANING /tmp FOLDER'
    rm -f /tmp/darmeth.zip
    sleep 1
    echo
    echo 'RELOADING SERVICES - PLEASE WAIT'
    wget -qO /dev/null "${rld_uri}?mode=1"
    wget -qO /dev/null "${rld_uri}?mode=2"
    echo
    echo 'DARMETH BOUQUETS UPDATED'
    echo
    exit 0
    Last edited by birdman; 25-06-17 at 15:15.
    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

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.