SABnzdb

From NAS-Central Zyxel Wiki
Jump to: navigation, search

What it is

This is about installing SABnzbd on a Medion Life P89626/P89630 aka NSA-212 (and possibly others).

A big Thank You goes out to Grish on whose work this is based. See http://forums.whirlpool.net.au/archive/1817691 for details.

Installation Steps

Prerequisite: Get a working FFP-stick

See FFP-stick#How_to_install for the installation. FFP 0.7 works fine.

Note that the initial installation can take quite some time (30 mins). Reboot after it's finished.

You can check that it's done by telnet'ing into your NAS:

telnet nas-server

Once it's up, you should install and start SSH, and disable Telnet.

Download and install required packages

I use uwsiteloader to set up the package sources:

ssh root@nas-server
cd /home/root
wget http://wolf-u.li/u/441 -O /ffp/bin/uwsiteloader.sh
chmod a+x /ffp/bin/uwsiteloader.sh
uwsiteloader.sh

Select all sites. (Use up, down, tab, spacebar) Select yes when asked to update the list.

Use Slacker to install the packages:

slacker -i

Select those packages:

  • kylek:sudo
  • memiks:par
  • memiks:par2cmdline
  • memiks:setuptools
  • memiks:unrar
  • mz:python2
  • mz:sqlite
  • s:binutils
  • s:gcc
  • s:linux-headers
  • s:make
  • s:mpc
  • s:mpfr
  • s:uClibc

Fix sudo:

chown 0 /ffp/libexec/sudoers.so

Install SABnzbd

Install Python modules

easy_install Cheetah feedparser pyOpenSSL pysqlite
# yenc cannot be installed from pypi.
easy_install https://bitbucket.org/dual75/yenc/get/a9bae29465ad.tar.gz

Install SABnzbd

I put it into /ffp/bin/sabnzbd. You may want to use a different directory.

cd /home/root
wget http://downloads.sourceforge.net/project/sabnzbdplus/sabnzbdplus/sabnzbd-0.6.15/SABnzbd-0.6.15-src.tar.gz
tar xvzf SABnzbd-0.6.15-src.tar.gz
mkdir -p /ffp/bin/sabnzbd
mv SABnzbd-0.6.15/* /ffp/bin/sabnzbd
rm -rf SABnzbd-0.6.15/

Configuration

Decide on those directories:

  • Configuration: I use /i-data/md0/thowi/sabnzbd/
  • Downloads: I use /i-data/md0/data/downloads/

Make sure those directories exist and are readable and writable by everybody. You will have to set the download directory from SABnzbd's web interface once it's running. You may also want to set the permissions to 777 so that all users can read and write the downloaded files.

Startup

For the initial startup go to the SABnzbd program directory and start it up:

cd /ffp/bin/sabnzbd/  # Or wherever you put it.
sudo -u nobody PYTHON_EGG_CACHE=/tmp /ffp/bin/python2.7 SABnzbd.py -b 0 -s 0.0.0.0:8080 -f XXXXX/i-data/md0/your/sab/config/root/sabnzbd.iniXXXXX  # Adapt to your config dir.

You can now connect to http://nas-server:8080/ and should be able to set it up.

Once done, you can quit SABnzbd by hitting Ctrl-C in the terminal.

For more command line options see http://wiki.sabnzbd.org/command-line-parameters.

Automatic startup on boot

Create a file /ffp/start/sabnzbd.sh with this content (adapt to your paths!):

#!/ffp/bin/sh

# PROVIDE: sabnzbd
# REQUIRE: LOGIN

# Adapt this to your local config.
sabnzbd="/ffp/bin/sabnzbd/SABnzbd.py"
config="/i-data/md0/thowi/sabnzbd/sabnzbd.ini"
python="/ffp/bin/python2.7"
python_egg_tmp="/tmp"

# Start the server.
sudo -u nobody PYTHON_EGG_CACHE="$python_egg_tmp" $python "$sabnzbd" -b 0 -d -f "$config"

Make it executable:

chmod u+x /ffp/start/sabnzbd.sh

Usage

Just point your browser at http://nas-server:8080/.

There are some Chrome and Firefox extensions as well!

Speed

When using SSL I only get ~2MB/sec. Without SSL I get ~3MB/sec.

For that reason I actually switched to NZBGet, which saturates my line at 6MB/sec.