1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Setup Usenet client with Optware.

Discussion in 'Tomato Firmware' started by lancethepants, May 31, 2012.

  1. lancethepants

    lancethepants Network Guru Member

    This tutorial will show how to setup SABnzbd, a popular cross-platform usenet client on your router, using the latest source. Before you continue, you will need to have already installed optware.

    First you need to install some required packages by running the following code.
    Code:
    ipkg install python26 py26-cheetah py26-openssl unzip unrar par2cmdline
    

    Afterwards, go to the SABNzbd website to find latest "Python Source". (0.6.15 at the time of writing)
    http://sabnzbd.org/download/
    Run the following code, adjust for the version you're using.

    Code:
    cd /opt
    wget http://downloads.sourceforge.net/project/sabnzbdplus/sabnzbdplus/sabnzbd-0.6.15/SABnzbd-0.6.15-src.tar.gz
    tar zxvf SABnzbd-0.6.15-src.tar.gz
    rm SABnzbd-0.6.15-src.tar.gz
    mv SABnzbd-0.6.15/ sabnzbd
    

    To automatically start SABnzbd at boot, place the following in the router GUI.
    USB and NAS -> USB Support -> Run after mounting
    If you want to start it now without needing a reboot, also run this in the cli.
    Change 8080 to the desired port you want to run on, making sure not to pick one already in use.

    Code:
    /opt/bin/python2.6 /opt/sabnzbd/SABnzbd.py -d -s 0.0.0.0:8080
    

    Direct your browser to your router 'ip : port' to finish the setup.
    Make sure the 'Access' option in the gui setup is set to 'I want SABnzbd to be viewable by any pc on my network.', or else you won't be able to access it through the web gui.
    Also remember to go to the config and place the path of where you want the nzb's to download.



    Optional:

    You can also optionally install yenc. This will make the router more efficient at decoding binary files.
    This module is found in optware for python 2.5, however, I found that the newest version of SABnzbd did not work under python 2.5. Python 2.7 in optware is missing the cheetah, pyopenssl, and yenc modules, so that is why I opted for python 2.6.
    The yenc module must then by compiled for Python 2.6, but this is extremely fast once you've installed the compilation tools.

    Code:
    ipkg install buildroot
    mkdir /opt/yenc && cd /opt/yenc
    wget http://www.golug.it/pub/yenc/yenc-0.4.0.tar.gz
    tar zxvf yenc-0.4.0.tar.gz && cd yenc-0.4.0/
    /opt/bin/python2.6 ./setup.py build
    /opt/bin/python2.6 ./setup.py install
    
    You can then restart SABnzbd or reboot the router for yenc to be activated.

    Don't expect incredible speeds or to obtain what you could get on a PC. I did notice that connecting to an NZB server with SSL was definately slower than without SSL.
    SSL requires more cpu computations.
    This does however, make it nice to download content with a low powered device.

    Enjoy!

    edit:

    Here is an installation script that will completely install sabnzbd, and set it to automatically restart every reboot. You can store it somewhere in /opt if desired for an easy quick installation. Just adjust the 'STARTUP' line to have the port you want to run on.

    sabnzbd.sh
    Code:
    #!/bin/sh
    ipkg install python26 py26-cheetah py26-openssl unzip unrar buildroot
    cd /opt
    wget http://downloads.sourceforge.net/project/sabnzbdplus/sabnzbdplus/sabnzbd-0.6.15/SABnzbd-0.6.15-src.tar.gz
    tar zxvf SABnzbd-0.6.15-src.tar.gz
    rm SABnzbd-0.6.15-src.tar.gz
    mv SABnzbd-0.6.15/ sabnzbd
    mkdir /opt/yenc && cd /opt/yenc
    wget http://www.golug.it/pub/yenc/yenc-0.4.0.tar.gz
    tar zxvf yenc-0.4.0.tar.gz && cd yenc-0.4.0/
    /opt/bin/python2.6 ./setup.py build
    /opt/bin/python2.6 ./setup.py install
    [ ! -d /opt/etc/config ] && mkdir /opt/etc/config
    STARTUP="/opt/bin/python2.6 /opt/sabnzbd/SABnzbd.py -d -s 0.0.0.0:80"
    echo "#!/bin/sh" > /opt/etc/config/sabnzbd.wanup
    echo "$STARTUP" >> /opt/etc/config/sabnzbd.wanup
    chmod +x /opt/etc/config/sabnzbd.wanup
    /opt/etc/config/sabnzbd.wanup
    
     
    gffmac likes this.
  2. lancethepants

    lancethepants Network Guru Member

    Stupid site no longer allows to you to edit your posts. The very last script is missing par2cmdline in the installation.
     
  3. gffmac

    gffmac Serious Server Member

    Ive got everything setup sabnzbd and sickbeard but cant get my downloads to unrar for some reason. Followed the guide above, files get par repaired just dont unrar.

    I can see this message in the sab log :Skipping unrar file check due to unreliable file names or old unrar.
     
    Last edited: Nov 8, 2014
  4. lancethepants

    lancethepants Network Guru Member

    Supposedly entware now has everything needed to setup usenet, though I haven't looked into myself. If you don't want to mess with your current setup, you can try the static unrar binary off my site.
    http://files.lancethepants.com
    Tomatoware as it comes has the ability to run all the usenet apps as well. You just need to run the install script in the python folder.
     
  5. lancethepants

    lancethepants Network Guru Member

    @gffmac Looks like the optware unrar binary is segfaulting, that would be the issue.
     
  6. gffmac

    gffmac Serious Server Member

    lancethepants likes this.
  7. gffmac

    gffmac Serious Server Member

    Been trying to get things running with entware... Sabnzbd setup fine it seems, sickbeard giving me trouble though.

    Managed to get Sickbeard up and running it seemed but was getting logs about enable to read xml files and sab wouldnt open up an nzb directly and download. A pitty as it was running so much smoother than in optware. Gone back to optware for now.
     
    Last edited: Nov 11, 2014

Share This Page