The personal ramblings of Jon Carlos mobile & web developer and technology enthusiast.

Sunday, 15 May 2011

ubuntu & SABnzbd auto start on reboot

11:19 Posted by Webmonger No comments
I've recently set-up a new media server at home for distributing videos and music to my PS3, Xbox, iPhone and iPad.

I had been running a Windows Home Server but the hardware became flaky so I decided to start a fresh with a new clean disk.

I used the fantastic mythbuntu distro which installs a full version of ubuntu with mythtv already installed and configured. If you want to see what mythtv is like without installing you can do this very simply by putting the disk in and running it as a Live disk instead of installing. You can pretty much do what ever you want to do with the live disk you just can't save anything.

OK so enough about that I'm sure you can work it out if you want it's not rocket science you just click the install button. It does what it says on the tin.

So after mythbuntu was installed I wanted to get my news group reader setup so I could manage downloads on the server. If you've not head about SABnzbd you're missing a trick. No more distributed news readers across multiple machines SABnzbd is a one stop shop. Download, post processing and organization are all built in.

So how to install SABnzbd:
Open up a terminal windows a type.

sudo apt-get update
sudo apt-get install sabnzbdplus

And there you go SABnzbd+ is now installed. To start your server:


The problem I came across was that every time I restarted the server or closed the terminal window the server stopped. What I had not read was the small print after installation.
If you want the program to be started as a service (i.e., in the background on system boot)...

So for those of you who like me want the service to start every time you machine starts follow these instructions:

Edit /etc/default/sabnzbdplus

sudo nano /etc/default/sabnzbdplus

USER= to USER=yourusername
PORT= to PORT=8080

Once this is all complete save the file "ctrl o" then "ctrl x"

Now start the server again using:

/etc/init.d/sabnzbdplus start

Stop using:

/etc/init.d/sabnzbdplus stop

For more information check out the unofficial ubuntu page on the SABnzbd site.