1. mdmachine

    mdmachine GBAtemp Regular
    Member

    Joined:
    Jun 15, 2009
    Messages:
    183
    Country:
    United States
    Are you running it in headless mode usingt -S?
    "python3 /home/pi/NUT/nut.py -S" for example.
     
    Hofure likes this.
  2. Hofure

    Hofure Newbie
    Newcomer

    Joined:
    Oct 25, 2019
    Messages:
    9
    Country:
    United Kingdom
    Oh whoops I was doing it wrong. Thanks, it works now !

    Sent from my GM1913 using Tapatalk
     
  3. pikachullk

    pikachullk Newbie
    Newcomer

    Joined:
    Aug 12, 2015
    Messages:
    5
    Country:
    Switzerland
    I have some questions about this awsome app....A very beginner of linux...maybe this these question are silly,hope someone could help me:
    1.Can I run NUT SERVER(nut.py -S or server.py) as a background service without gui as start up on ubuntu?I google this,edit rc.local can help.but if I wanna restart it,I have to kill this process and start it again...maybe not so friendly for CLI
    2.after I ran it with rc.local,how I can scan new NSP with command?
    thank you for your good app~and thank you if you answer my questions~~~

    — Posts automatically merged - Please don't double post! —

    I have some questions about this awsome app....A very beginner of linux...maybe this these question are silly,hope someone could help me:
    1.Can I run NUT SERVER(nut.py -S or server.py) as a background service without gui as start up on ubuntu?I google this,edit rc.local can help.but if I wanna restart it,I have to kill this process and start it again...maybe not so friendly for CLI
    2.after I ran it with rc.local,how I can scan new NSP with command?
    thank you for your good app~and thank you if you answer my questions~~~
     
  4. blawar

    OP blawar Developer
    Developer

    Joined:
    Nov 21, 2016
    Messages:
    1,310
    Country:
    United States
    Run
    nut.py —server for headless background

    server.py is gui

    — Posts automatically merged - Please don't double post! —

     
  5. mdmachine

    mdmachine GBAtemp Regular
    Member

    Joined:
    Jun 15, 2009
    Messages:
    183
    Country:
    United States
    I had better experience running NUT as a service using systemd.
    So, you would want to make a systemd file.

    This can be /lib/system... or /etc/system... So check!
    Code:
    sudo nano /lib/systemd/system/NUT.service
    And you need to fill that with information for the service to run, and how.
    This script will call upon nut_headless.sh file I created beforehand.
    Obviously you'd need to change locations, etc...
    Plenty of further documentation about systemd and its uses.

    Code:
    [Unit]
    Description=NUT Daemon
    After=network-online.target
    
    [Service]
    Type=simple
    User=username (or remove this)
    Group=group (or remove this)
    UMask=007 (if shared by other users, otherwise remove)
    ExecStart=/home/user/NUT/nut_headless.sh &
    Restart=on-failure
    TimeoutStopSec=300
    
    [Install]
    WantedBy=multi-user.target
    save and exit (ctrl+x).

    Set permissions using:
    This can be /lib/system... or /etc/system... So check!
    Code:
    sudo chmod 644 /etc/systemd/system/NUT.service
    Now reload your services:
    Code:
    sudo systemctl daemon-reload
    Enable it:
    Code:
    sudo systemctl enable NUT.service
    Check its status:
    Code:
    sudo systemctl status NUT.service
    You should see it running.

    You can use "restart, stop, disable, enable, start" in place of "status" to the service as options.

    The shell script I used that was called upon was (you can use nano to make this like you did with the systemd file):
    Code:
    #!/bin/sh
    sleep 20
    python3 /home/user/NUT/nut.py -S
     
    Last edited: Jan 15, 2020
    pikachullk likes this.
  6. SaulFemm

    SaulFemm Member
    Newcomer

    Joined:
    Oct 25, 2018
    Messages:
    30
    Country:
    United States
    Don't know where else to ask this. Is it possible that tinfoil.media is blocking certain user-agents? I can't download the titledb with python.
     
  7. blawar

    OP blawar Developer
    Developer

    Joined:
    Nov 21, 2016
    Messages:
    1,310
    Country:
    United States
    what exactly are you trying to download?
     
  8. Jeshjesh

    Jeshjesh Newbie
    Newcomer

    Joined:
    Nov 10, 2019
    Messages:
    4
    Country:
    United States
    Will this run on a synology NAS? If so do you have any walkthrough?
     
  9. blawar

    OP blawar Developer
    Developer

    Joined:
    Nov 21, 2016
    Messages:
    1,310
    Country:
    United States
    It will, however I am not baller enough to run one of those so I cannot directly offer you assistance to walk you through it.
     
  10. Jeshjesh

    Jeshjesh Newbie
    Newcomer

    Joined:
    Nov 10, 2019
    Messages:
    4
    Country:
    United States
    Messing around with it a bit and this is where I'm at. Not sure if that's even the right thing to try

    [email protected]:/$ python3 /volume1/Switch/Games/nut.py -S

    Traceback (most recent call last):

    File "/volume1/Switch/Games/nut.py", line 9, in <module>

    import urllib3

    ImportError: No module named 'urllib3'
     
  11. pikachullk

    pikachullk Newbie
    Newcomer

    Joined:
    Aug 12, 2015
    Messages:
    5
    Country:
    Switzerland
    That really help my dear friend~~thank you for your great help~
    <(_ _)>
     
  12. pikachullk

    pikachullk Newbie
    Newcomer

    Joined:
    Aug 12, 2015
    Messages:
    5
    Country:
    Switzerland
    I use this script~But this systemd file restart every 20second~I don't know why~
    I've already change my path of nut.py in every script...would you please help me again~
    I do all this on ubuntu 18.04...is that a problem?
     
  13. Jeshjesh

    Jeshjesh Newbie
    Newcomer

    Joined:
    Nov 10, 2019
    Messages:
    4
    Country:
    United States
    I added SMB in tinfoil to my NAS but when I browse to directory no .nsp show. When I added SFTP and try installing an .nsp it gives and error Failed to open NSP. Any ideas? Just trying to get access to my collection wirelessly on my NAS since its always running
     
  14. mdmachine

    mdmachine GBAtemp Regular
    Member

    Joined:
    Jun 15, 2009
    Messages:
    183
    Country:
    United States
    If you simply run the nut.py on it's its own, does it run normally?

    And you made a sh file for the service to execute?
    If so, run that on its own as well make sure it's working.

    Sounds like it's running the shell script, hence the 20 seconds. In that shell, it "sleeps" for 20 seconds, then attempts to run, which is failing, and restarting.
     
  15. pikachullk

    pikachullk Newbie
    Newcomer

    Joined:
    Aug 12, 2015
    Messages:
    5
    Country:
    Switzerland
    both of the nut.py and sh scripts runs normally....as long as I execute it with systemd~it failed...
    every 20second it restart again...even I use root to run it.....
     
  16. reman

    reman Member
    Newcomer

    Joined:
    Jan 1, 2020
    Messages:
    11
    Country:
    United States
    Awesome,I am wanting it for a long time.
     
  17. mdmachine

    mdmachine GBAtemp Regular
    Member

    Joined:
    Jun 15, 2009
    Messages:
    183
    Country:
    United States
    In the service script try to run it with your user (not root) and group, if you haven't already. If the scripts work normally than something is happening VIA the service executing, sleeping 20 seconds, then failing.

    The nut.system contents properly pointing to the .sh?

    Also feel free to read up about systemd for your distro, my post is just an example. It does work for me but different distros sometimes need different configuration.

    I will say it was a royal pain to get nut to run on boot. As I had tried crontab, rc.local and other means before trying the service.
     
    Last edited: Jan 20, 2020
  18. SaulFemm

    SaulFemm Member
    Newcomer

    Joined:
    Oct 25, 2018
    Messages:
    30
    Country:
    United States
    titles.json. I've actually found that this is somehow related to my VPN and affects multiple sites. Shouldn't be on tinfoil.io's side.
     
    Last edited: Jan 20, 2020
  19. alitriple

    alitriple Newbie
    Newcomer

    Joined:
    Dec 16, 2017
    Messages:
    1
    Country:
    Iran
    sory post deleted
     
    Last edited: Jan 21, 2020 at 1:57 PM
  20. drguild

    drguild Member
    Newcomer

    Joined:
    Mar 2, 2014
    Messages:
    26
    Country:
    Don't know if you guys have experienced this but tried to put in a couple things but it will install 1.3-1.4gb then just seems to hang I tried a game update as well as a full game.
    I am on SXOS and swapped my card to a 400gb from 200gb I tried the SX and this Tinfoil version of version of Nut same result.

    No idea if its because I upgraded my card.

    Using the latest SX installer doesn't work with nut even with the SX Nut version, as it just doesn't start, so using the latest HBG Tinfoil which does the above.

    Installing the update directly from SD with HBG worked no no idea why it seems to stall with usb nut at 1.3-1.4gb.
     
    Last edited: Jan 22, 2020 at 10:20 AM
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - installer, Installer, Network