SABnzbd on WD My Book Live

Support for the Debian/Ubuntu package, created by JCFP.
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
benjamin11
Newbie
Newbie
Posts: 3
Joined: May 25th, 2011, 12:19 pm
Location: the Netherlands

SABnzbd on WD My Book Live

Post by benjamin11 »

Hi all,

I managed to install SABnzbd on a WD My Book Live, wich runs on a Debian Lenny distribution.
I can run SABnzbd in the SSH terminal with:

Code: Select all

MyBookLive:~# python /opt/SABnzbd-0.6.1/SABnzbd.py 0.0.0.0:8080
But the problem is that SABnzbd stops when I close the terminal.
And the benefit of running SABnzbd on a NAS is that you don't need a computer anymore.
How can I get SABnzbd to run on its own?

I'm sorry for my lack of Debian knowledge, but this is my first Debian/Linux experience ever!

Thank you ;)
benjamin11
Newbie
Newbie
Posts: 3
Joined: May 25th, 2011, 12:19 pm
Location: the Netherlands

Re: SABnzbd on WD My Book Live

Post by benjamin11 »

I've tried using screen, but it says 'Command not found'.
So now I'm trying to run it as a daemon. I've found this page: http://wiki.sabnzbd.org/install-as-a-unix-daemon
But as I said earlier, my knowledge of Linux is bad, and my coding skills aren't that good either.

So what do I use to create this script?
Do I have to compile it? Can I do this in Xcode?
Or do I just have to insert the code in a text document and let Debian compile it?

thanks for the help!
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: SABnzbd on WD My Book Live

Post by shypike »

Just start it from a terminal like this:

./SABnzbd.py -d -f /path/to/sabnzbd.ini

Note that the folders will now all be in /path/to instead of in the user's home folder.
benjamin11
Newbie
Newbie
Posts: 3
Joined: May 25th, 2011, 12:19 pm
Location: the Netherlands

Re: SABnzbd on WD My Book Live

Post by benjamin11 »

shypike wrote: Just start it from a terminal like this:

./SABnzbd.py -d -f /path/to/sabnzbd.ini

Note that the folders will now all be in /path/to instead of in the user's home folder.
this doesn't work either.


Todat I've tries to run the script from http://wiki.sabnzbd.org/install-as-a-unix-daemon
I edited it to this:

Code: Select all

#!/bin/sh

case "$1" in
start)
  echo "Starting SABnzbd."
  /usr/bin/sudo -u USERNAME -H /opt/SABnzbd-0.6.2/SABnzbd.py -d -f /home/USERNAME/.sabnzbd/sabnzbd.ini
;;
stop)
  echo "Shutting down SABnzbd."
  /usr/bin/wget -q --delete-after "http://0.0.0.0:8085/sabnzbd/api?mode=shutdown&apikey=MY-API-KEY"
;;
*)
  echo "Usage: $0 {start|stop}"
  exit 1
esac

exit 0
In USERNAME I've place the username to log in to my My Book Live, and in MY-API-KEY I placed the api key I got from SABnzbd.
I named the script 'sabnzbd' and placed the script in /etc/init.d
I made the script executable using:

Code: Select all

chmod a+x /etc/init.d/sabnzbd
But then I tried to set up symlinks using

Code: Select all

update-rc.d sabnzbd defaults
But it returned:

Code: Select all

update-rc.d: warning: /etc/init.d/sabnzbd missing LSB information
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
 Adding system startup for /etc/init.d/sabnzbd ...
   /etc/rc0.d/K20sabnzbd -> ../init.d/sabnzbd
   /etc/rc1.d/K20sabnzbd -> ../init.d/sabnzbd
   /etc/rc6.d/K20sabnzbd -> ../init.d/sabnzbd
   /etc/rc2.d/S20sabnzbd -> ../init.d/sabnzbd
   /etc/rc3.d/S20sabnzbd -> ../init.d/sabnzbd
   /etc/rc4.d/S20sabnzbd -> ../init.d/sabnzbd
   /etc/rc5.d/S20sabnzbd -> ../init.d/sabnzbd
off course I took a look at the Debian wiki, but my experience with writing scripts is zero, so I don't exactly know what's wrong.
Does anyone know what the problem is?
tmiski
Newbie
Newbie
Posts: 10
Joined: September 22nd, 2011, 1:58 pm

Re: SABnzbd on WD My Book Live

Post by tmiski »

benjamin11 wrote:Hi all,
I managed to install SABnzbd on a WD My Book Live, wich runs on a Debian Lenny distribution.
I just bought a My Book Live 2TB and would love to install SABnzbd. Would you mind posting the steps to set it up, I'm new to the Debian distro. I should be able to help with the Daemon stuff too.

p.s. I've already enabled ssh and installed optware.
User avatar
jcfp
Release Testers
Release Testers
Posts: 1022
Joined: February 7th, 2008, 12:45 pm

Re: SABnzbd on WD My Book Live

Post by jcfp »

tmiski wrote:I just bought a My Book Live 2TB and would love to install SABnzbd. Would you mind posting the steps to set it up
This thread seems to know how, with the topic starter only making a small config error but otherwise having a working setup. Just adding " -s 0.0.0.0:8080" to the line that guy uses to start the application should fix that, without the need to edit config files.
Post Reply