The Perfect Media Server - Ubuntu 11.10 [Sabnzbd+/Sickbeard/Couch Potato/Headphones/Serviio] - Page 3

5. Installing Sickbeard

Open up a terminal window and execute the following commands.

wget https://github.com/midgetspy/Sick-Beard/tarball/master -O sickbeard.tar.gz
tar xf sickbeard.tar.gz
ls

After the ls command, you will see something like this:

user@media-server:~$ ls
Desktop    Downloads         midgetspy-Sick-Beard-8d7484d  Pictures  Templates
Documents  examples.desktop  Music                         Public    Videos

We want to move the midgetspy-Sick-Beard-xxxxxx folder to .sickbeard, you can do so with the following command (you will need to alter the command to suit what the folder name):

mv midgetspy-Sick-Beard-8d7484d .sickbeard
sudo mv .sickbeard/init.ubuntu /etc/init.d/sickbeard
sudo gedit /etc/init.d/sickbeard

Edit the APP_PATH to point to /home/user/.sickbeard, where "user" is your username and set RUN_AS to your username, your file should then look something like this:

#! /bin/sh

### BEGIN INIT INFO
# Provides:          sickbeard
# Required-Start:    $all
# Required-Stop:     $all
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts instance of Sick Beard
# Description:       starts instance of Sick Beard using start-stop-daemon
### END INIT INFO

############### EDIT ME ##################
# path to app
APP_PATH=/home/user/.sickbeard

# path to python bin
DAEMON=/usr/bin/python

# Path to store PID file
PID_FILE=/var/run/sickbeard/sickbeard.pid
PID_PATH=$(dirname $PID_FILE)

# script name
NAME=sickbeard

# app name
DESC=SickBeard

# user
RUN_AS=user

# data directory
DATA_DIR=/home/${RUN_AS}/.sickbeard

# startup args
DAEMON_OPTS=" SickBeard.py -q --daemon --nolaunch --pidfile=${PID_FILE} --datadir=${DATA_DIR}"

############### END EDIT ME ##################

test -x $DAEMON || exit 0

set -e

if [ ! -d $DATA_DIR ]; then
    mkdir -p $DATA_DIR
    chown $RUN_AS $DATA_DIR
fi

case "$1" in
  start)
        echo "Starting $DESC"
        rm -rf $PID_PATH || return 1
        install -d --mode=0755 -o $RUN_AS -g $RUN_AS $PID_PATH || return 1
        start-stop-daemon -d $APP_PATH -c $RUN_AS --start --pidfile $PID_FILE --exec $DAEMON -- $DAEMON_OPTS
        ;;
  stop)
        echo "Stopping $DESC"
        start-stop-daemon --stop --pidfile $PID_FILE --retry 15
        ;;

  restart|force-reload)
        echo "Restarting $DESC"
        start-stop-daemon --stop --pidfile $PID_FILE --retry 15
        start-stop-daemon -d $APP_PATH -c $RUN_AS --start --pidfile $PID_FILE --exec $DAEMON -- $DAEMON_OPTS
        ;;
  *)
        N=/etc/init.d/$NAME
        echo "Usage: $N {start|stop|restart|force-reload}" >&2
        exit 1
        ;;
esac

exit 0

Save your changes, then set sickbeard to run on boot, with the following command:

sudo update-rc.d sickbeard defaults

Start sickbeard for the first time:

sudo service sickbeard start

Open firefox and browse to http://localhost:8081
You will be greeted with the following screen.

Step 15

At the top of the window you may see Unknown version: If you've never used the Sick Beard upgrade system then I don't know what version you have.--Update Now Click the Update Now link.

Sickbeard will restart, once the page has reloaded, click Config | General.

The configuration is divided into 5 tabs, General | Search Settings | Search Providers | Post Processing | Notifications.

First untick Launch Browser in the General Configuration, since we will be launching sickbeard on boot, and click Save Changes.

Click the Search Settings tab and change NZB Method: to SABnzbd, and set the SABnzbd URL to: http://localhost:8080/

Set the SABnzbd username and password to the settings you used in the SABnzbd configuration. The API key will need to be retrieved from the SABnzbd interface, so open http://localhost:8080 in another browser tab, and go to the config page and under General tab you will see API key, copy the text in there and switch back to the Sickbeard config tab and paste the API ky into the SABnzbd API Key textbox. Click Test SABnzbd to test your settings, then click Save Changes.

Click the Search Providers tab and tick which providers you want to use, If you have signed up for an account with NZBs'R'US, NZBs.org, NZBMatrix or Newzbin, make sure you tick them here. You can also drag the providers around to select what priority you would like them to be searched.

Underneath Provider priorities you will see Configure Built-In Providers, choose the provider you want to configure from the drop down and then enter the appropriate information for that provider., click Save Changes when done.

Click the Post Processing tab. You will need to enter /home/user/Downloads/complete/tv into the TV Download Dir textbox, replace user with your username. This is the folder that Sabnzbd+ will place completed downloads in. We will now configure SickBeard to post-process these files.

Untick Keep Original Files, we don't want to keep the originals around after we have copied them to our media storage location. Configure what metadata you want to create, by choosing your target from Metadata Type drop down and ticking the appropriate metadata item from the Create listbox, click Save Changes when done.

Lets add a show to test it out.

Click Home on the Home menu, and then click Add Show button, Click Add New Show button, type in the Show name and click Search. If Sickbeard comes back with multiple matches, choose the correct show and then click Next. Click the New button, navigate to the /Media/TV Shows folder and click OK
Click Next, Choose the initial status of missing episodes (if you want to download all the episodes, change Skipped to Want), place a tick in Season Folders. Select your prefferred download quality. I would also recommend clicking the Save Defaults button before clicking Add Show.

The Show will then be added to your show list with (loading) against it, after some time, hit refresh until you see the display change it should load all the relevant info and display the number of episodes under the Downloads column, if you click the show name, it will drill down into the show and display all the episodes and seasons, from this screen you can change the status of any episodes you want to download, from Skipped to Want and then they will be downloaded for you.

 

6. Installing Couch Potato

Open up a terminal window and execute the following commands.

wget https://github.com/RuudBurger/CouchPotato/tarball/master -O couchpotato.tar.gz
tar xvf couchpotato.tar.gz
ls

After the ls command, you will see something like this:

user@media-server:~$ ls
couchpotato.tar.gz  Downloads         Pictures                        Templates
Desktop             examples.desktop  Public                          Videos
Documents           Music             RuudBurger-CouchPotato-2344e1a
user@media-server:~$

We want to move the RuudBurger-CouchPotato-xxxxxxx to .couchpotato, you can do so with the following command (you will need to alter the command to suit what the folder name):

mv RuudBurger-CouchPotato-2344e1a .couchpotato
sudo mv .couchpotato/initd.ubuntu /etc/init.d/couchpotato
sudo mv .couchpotato/default.ubuntu /etc/default/couchpotato
sudo gedit /etc/default/couchpotato

Change APP_PATH to /home/user/.couchpotato, where user is your username, and change ENABLE_DAEMON to 1, and RUN_AS to your username, your file should then look something like this:

# This file is sourced by /etc/init.d/couchpotato
#
# When couchpotato is started using the init script
# is started under the account of $USER, as set below.
#
# Each setting is marked either "required" or "optional";
# leaving any required setting unconfigured will cause
# the service to not start.

# [required] set path where couchpotato is installed:
APP_PATH=/home/user/.couchpotato

# [optional] change to 1 to enable daemon
ENABLE_DAEMON=1

# [required] user or uid of account to run the program as:
RUN_AS=user

# [optional] change to 1 to enable updating from webinterface
# this changes ownership of /opt/couchpotato to user set @ RUN_AS
WEB_UPDATE=0

# [optional] full path to the configuration file of your choice;
# otherwise, the default location (~/.couchpotato) is used:
CONFIG=

# [optional] full path to the folder to store data (databases/thumbs) in;
# otherwise, the default location (~/.couchpotato) is used:
DATADIR=

# [optional] Force port number to listen on, otherwise the one set in config.ini is used:
PORT=

# [optional] full path for the pidfile
# otherwise, the default location /var/run/couchpotato/couchpotato.pid is used:
PID_FILE=

Now we can set couchpotato to run on boot, and start it running

sudo update-rc.d couchpotato defaults
sudo service couchpotato start

You should see a message letting you know that the service has started, time to flick back to Firefox and open up the Couch Potato interface, the default port is 5000, so browse to http://localhost:5000 and you should see a pretty plan looking screen with No movies added, click here to add a movie, but first we need to configure Couchpotato, so click the gear icon at the top to get to the config screen.

If you see a message like this: Update (diff) available: update now, then click the Update now link to get the latest version, after a little while couchpotato will restart and you will be back at the config page.

Click General, and set a username and password if you like and untick launch browser, click Save.

Click the Downloaders tab and enter your Sabnzbd Host, Apikey, Username, Password. Also enter movies as the Category, then click Save.

Next is the Providers tab, enable all the providers that you want to use and enter the appropriate info, and click Save.

You can stop at the Quality tab if you want to modify any of the built-in profiles or create your own, but for now, the built-in ones will suffice, so onto the Renaming tab.

We want to enable renaming, so tick the Enable checkbox, and enter /home/user/Downloads/complete/movies as your SABnzbd movie Download folder, replace user with your user name. Enter /Media/Movies as your Movie destination and If you want to change the naming options, do so, I prefer the default naming, then click Save.

Click the Extras tab, the only thing I use the Extras tab for is to tick the Save Metadata check box, but you can add details for Blu-Ray.com, Kinepolis.com, Trailers, Subtitles, Trakt and IMDB Watchlists, to that your movie want list can be populated automatically from these other sources. I prefer to add movies manually to couchpotato.

We are done, so click the About tab and click Restart to apply the password changes.

Share this page:

3 Comment(s)