Install SickBeard from Source on CentOS 6

Hello there! This how-to for installing SickBeard is very similar to the one covering SABnzbd, and if you followed that guide then we have no pre-requisites to worry about here and get just dive right in. First things first, let's grab the source files for SickBeard (and we are pulling the latest development build).

cd /apps
git clone git://github.com/midgetspy/Sick-Beard.git SickBeard
mkdir /apps/data/.sickbeard

Just like that, we have the latest files copied down and just need to create our init script.

vi /etc/init.d/SickBeard

Here is the init script I use (may not be the best, but it works for me):

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/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 SickBeard
# Description:       starts SickBeard
### END INIT INFO

# Source function library.
. /etc/init.d/functions

## Variables
prog=SickBeard
lockfile=/var/lock/subsys/$prog
homedir=/apps/SickBeard
datadir=/apps/data/.sickbeard
configfile=/apps/data/.sickbeard/sickbeard.ini
pidfile=/var/run/sickbeard.pid
nice=
##

options=" --daemon --nolaunch --pidfile=$pidfile --datadir=$datadir --config=$configfile"

start() {
        # Start daemon.
        echo -n $"Starting $prog: "
        daemon --pidfile=$pidfile $nice python $homedir/SickBeard.py $options
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch $lockfile
        return $RETVAL
}

stop() {
        echo -n $"Shutting down $prog: "
        killproc -p $pidfile python
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && rm -f $lockfile
        return $RETVAL
}

# See how we were called.
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  status)
        status $prog
        ;;
  restart|force-reload)
        stop
        start
        ;;
  try-restart|condrestart)
        if status $prog > /dev/null; then
            stop
            start
        fi
        ;;
  reload)
        exit 3
        ;;
  *)
        echo $"Usage: $0 {start|stop|status|restart|try-restart|force-reload}"
        exit 2
esac

Last but not least, a little cleanup:

chmod 755 /etc/init.d/SickBeard
chkconfig SickBeard on
/etc/init.d/SickBeard start

Just like that, we have SickBeard installed and running along side SABnzbd on CentOS 6. Just browse to http://0.0.0.0:8081 (rpelace 0.0.0.0 with the ip of your SickBeard server) and configure SickBeard.

Ready for more? Check out Part 3 for a guide on install Headphones!


Related Posts


Share on: Twitter | Facebook | Google+ | Email


comments powered by Disqus