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 3 FirstFirst 123 LastLast
Results 16 to 30 of 36

Thread: changing/downloading files with permissions

  1. #16
    dsayers's Avatar
    Title
    ViX Beta Tester
    Join Date
    Mar 2016
    Posts
    1,761
    Thanks
    473
    Thanked 607 Times in 433 Posts
    ok ive changed
    Code:
    os.system('/usr/script/updateProviders.sh &')
    to
    Code:
    subprocess.call('/usr/script/updaProviders.sh')
    to run the script as os system doesn't always work but now it takes a thew minuets to run the plugin ive also removed sleep

  2. #17
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,776
    Thanks
    236
    Thanked 1,656 Times in 1,305 Posts
    Quote Originally Posted by dsayers View Post
    Sorry im not sure what you mean how should I chmod 755?
    You telnet/ssh into the system and, at the command line prompt, type:
    Code:
    chmod 755 filename
    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

  3. #18
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,776
    Thanks
    236
    Thanked 1,656 Times in 1,305 Posts
    Quote Originally Posted by dsayers View Post
    Sorry im not sure what you mean how should I chmod 755? everything eles seems to work fine im going to try
    Code:
    import subprocess
    
    subprocess.call(['chmod', '0444', 'path'])
    >>Sigh<<.

    You've now made it globally readable - so you still can't execute it.
    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

  4. #19
    dsayers's Avatar
    Title
    ViX Beta Tester
    Join Date
    Mar 2016
    Posts
    1,761
    Thanks
    473
    Thanked 607 Times in 433 Posts
    It does execute it that was an example of what I tried but changed 0775.

    and used to execute it
    Code:
    call('/usr/script/updaProviders.sh')
    im going to use try: and else rather than if os.exist

    The whole point of this is to release a plugin for all to use and not everyone is confident in using talnet I could simply have it download individual files and place them in the providers folder but the update providers option already does that. The script can be used with crontimer so we can download them regularly rather than having to do it manually

    Sent from my SM-G925F using Tapatalk
    Last edited by dsayers; 26-09-16 at 03:01.
    Using a Vu+Uno4k using a sundtek DVB-S/S2 USB tuner with vix 6.4 developer image

  5. #20
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,776
    Thanks
    236
    Thanked 1,656 Times in 1,305 Posts
    Well, here's what os.chmod does on my Vix system:
    Code:
    root@mbtwin:~# touch xyzzy
    root@mbtwin:~# chmod 000 xyzzy
    root@mbtwin:~# ls -l xyzzy
    ----------    1 root     root             0 Sep 26 02:46 xyzzy
    root@mbtwin:~# python
    Python 2.7.11 (default, Aug 11 2016, 18:37:41) 
    [GCC 5.3.0] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import os
    >>> os.chmod('xyzzy', 0755)
    >>> exit(0)
    root@mbtwin:~# ls -l xyzzy
    -rwxr-xr-x    1 root     root             0 Sep 26 02:46 xyzzy
    So you are doing something wrong. If it reports that the file does not exist then I'd believe it - perhaps you mis-typed the pathname....

    (PS: Note that it won't change the mode of a file on a vfat file-system, since they don't have modes and so they are all fudged in by a mount parameter, which on Vix sets everything to 755 anyway).
    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

  6. #21
    dsayers's Avatar
    Title
    ViX Beta Tester
    Join Date
    Mar 2016
    Posts
    1,761
    Thanks
    473
    Thanked 607 Times in 433 Posts
    Im not sure then Im certain it was correct and checked it loads of times but
    Code:
    call(['chmod', '0755', '/usr/script/updaProviders.sh'])
    works
    Last edited by dsayers; 26-09-16 at 03:28.

  7. #22
    dsayers's Avatar
    Title
    ViX Beta Tester
    Join Date
    Mar 2016
    Posts
    1,761
    Thanks
    473
    Thanked 607 Times in 433 Posts
    Was that an sh file you used? It seems to do the same for if os exist the path was correct for that but must of not seen it that's why I wasn't getting the os.chmod error till removing if os path exist

  8. #23
    Sicilian's Avatar
    Title
    The Boss
    Join Date
    Mar 2010
    Posts
    29,653
    Thanks
    23,582
    Thanked 26,051 Times in 7,637 Posts
    What exactly is this plugin and what receiver is it aimed at?

    We're aware of you creating hacked OpenViX images for Zgemma, as per our forum rules we do not support Zgemma here.
    D I S C L A I M E R

    My right to post information is protected under the rights for freedom act. In all instances, information discussed here on my posts are either hypothetical in nature, out of general curiosity, common knowledge, public knowledge, or role-play. Any use of the collective descriptions and shared knowledge from any of my posts are at the sole discretion of the reader. I am not responsible for what you do with it!

    Please help keep OpenViX online, donate HERE.
    Rules can be found
    HERE
    Support our sponsor World-Of-Satellite
    HERE
    GIGABLUE UHD QUAD 4K, VU+ DUO 4K SE, ZGEMMA H7S, VU+ UNO 4K SE
    Triax 1.1m Powered by TM2600, Fixed 28.2 Zone 2 dish with GT-SAT Unicable





  9. #24
    dsayers's Avatar
    Title
    ViX Beta Tester
    Join Date
    Mar 2016
    Posts
    1,761
    Thanks
    473
    Thanked 607 Times in 433 Posts
    It's aimed at all e2 receiver's using autobouqete marker that can run scripts it's so you can download the latest providers files via the script http://www.world-of-satellite.com/sh...ownload-Script via scriptrunner and run it on a regular basis using CronTimers.


    This has nothing to do with hacked images and as I said to abu baniaz I wasn't creating them there already available I just added my custommix updater plugin and released a backup. I stoped doing them about a month ago and using a supported image.

    I haven't fully finished it but if you want to try it you can and see it works on any e2 receiver
    Last edited by dsayers; 26-09-16 at 15:00.

  10. The Following User Says Thank You to dsayers For This Useful Post:

    Bangord30 (26-09-16)

  11. #25
    dsayers's Avatar
    Title
    ViX Beta Tester
    Join Date
    Mar 2016
    Posts
    1,761
    Thanks
    473
    Thanked 607 Times in 433 Posts
    Here it is I still need to add the inst files to reboot after downloading and remove older versions.

    ftp the ipk to tmp installs via ipk installer reboot box and run the Providers script downloader this will download and run the script that will downloads the following providers files from Github:

    SKY UK
    SKY IRL
    Freesat
    Terrestrial
    Virgin UK
    Cable ie

    Now we need to set a crontimer to run the script

    Menu > Timers > CronTimers (you may be prompted to install 'busybox-cron' - install this - box will restart)

    Add a Cron Timer by pressing the Green button

    Run How Often ? - Daily
    Time To Execute Command Or Script - Whatever you prefer, I have 00:00
    Command Type - predefined
    You should see the UpdateProviders.sh
    Press green to save then check if it says start on autostart if not yellow to start and blue to autostart

    IPK can be downloaded here enigma2-plugin-extentions-updateproviders_1.001_all.ipk

    I work 12 hour nights so I will start a new thread for it over the weekend with the post and preinst on a new version

    Thanks to pembo for providing the original script and birdman helping to edit to run via scriptrunner and helping with the python file
    Last edited by dsayers; 26-09-16 at 17:25.

  12. The Following User Says Thank You to dsayers For This Useful Post:

    Bangord30 (26-09-16)

  13. #26
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,776
    Thanks
    236
    Thanked 1,656 Times in 1,305 Posts
    Quote Originally Posted by dsayers View Post
    Here it is I still need to add the inst files to reboot after downloading and remove older versions.
    Why would you need to reboot? This isn't MS Windows....
    Restart the GUI - possibly....
    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

  14. #27
    dsayers's Avatar
    Title
    ViX Beta Tester
    Join Date
    Mar 2016
    Posts
    1,761
    Thanks
    473
    Thanked 607 Times in 433 Posts
    Well I need to have it restart gui

  15. #28
    dsayers's Avatar
    Title
    ViX Beta Tester
    Join Date
    Mar 2016
    Posts
    1,761
    Thanks
    473
    Thanked 607 Times in 433 Posts
    How would I add url errors in exept? ie couldn't connect or no network connection at the moment I have try: import urllib f.retrieve except print error message. I would rather have it display an error rather than carrying on with the rest of the python. I did have a look at the updateproviders.py file but I couldn't make sense of it.
    Last edited by dsayers; 27-09-16 at 07:45.

  16. #29
    Sicilian's Avatar
    Title
    The Boss
    Join Date
    Mar 2010
    Posts
    29,653
    Thanks
    23,582
    Thanked 26,051 Times in 7,637 Posts
    If i understand you correctly, this feature is already in ABM latest vix images. To live update the abm config file via github.
    D I S C L A I M E R

    My right to post information is protected under the rights for freedom act. In all instances, information discussed here on my posts are either hypothetical in nature, out of general curiosity, common knowledge, public knowledge, or role-play. Any use of the collective descriptions and shared knowledge from any of my posts are at the sole discretion of the reader. I am not responsible for what you do with it!

    Please help keep OpenViX online, donate HERE.
    Rules can be found
    HERE
    Support our sponsor World-Of-Satellite
    HERE
    GIGABLUE UHD QUAD 4K, VU+ DUO 4K SE, ZGEMMA H7S, VU+ UNO 4K SE
    Triax 1.1m Powered by TM2600, Fixed 28.2 Zone 2 dish with GT-SAT Unicable





  17. The Following User Says Thank You to Sicilian For This Useful Post:

    dsayers (27-09-16)

  18. #30
    dsayers's Avatar
    Title
    ViX Beta Tester
    Join Date
    Mar 2016
    Posts
    1,761
    Thanks
    473
    Thanked 607 Times in 433 Posts
    Quote Originally Posted by Sicilian View Post
    If i understand you correctly, this feature is already in ABM latest vix images. To live update the abm config file via github.
    Yes but you have to manually update config files using using the update config files option. With a script to download them you can set a crontimer to do it daily or weekly Evan abu baniaz said if the script could work with scriptrunner we could use a cronjob to do it I edited the script to work with script runner with the help of birdman. It was discussed in the update providers script thread to add an auto update option but nothing came of it.

    Plus I can do the same for my custommix file
    Last edited by dsayers; 27-09-16 at 15:05.

  19. The Following User Says Thank You to dsayers For This Useful Post:

    Bangord30 (27-09-16)

Page 2 of 3 FirstFirst 123 LastLast

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.