This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

[HOWTO] install Sickrage in my Sabnzbd Jail

Jails with XigmaNAS
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
rockking
NewUser
NewUser
Posts: 7
Joined: 08 Nov 2012 17:54
Status: Offline

[HOWTO] install Sickrage in my Sabnzbd Jail

Post by rockking »

I searched and searched (cause i'm a noob when it comes to Linux) for a 'how to' for installation of Sickrage in my Sab jail.
Google was not my friend, so i went over to the github Sickrage did a little browsing and in the base directory there was a init file for freebsd.
That was when i thougt hey maybe i can work with that.

First open a shell and go to your jail:

Code: Select all

jexec "Sabnzbd" csh
Change Sabnzbd with your jail name.

I did not install py and dep, because i already installed them with the Sab install.
I used the Sabguide as a reference for the steps i had to go through.
If you are installing in a fresh jail i suppose you need the same packages as Sab uses, they were:

Code: Select all

pkg install python27 py27-sqlite3 unzip py27-yenc py27-cheetah py27-openssl py27-feedparser py27-utils unrar par2cmdline
Probebly not the unrar en par2 zip packages but i dont know that for sure.

The first thing i did was:

Code: Select all

fetch https://github.com/SiCKRAGETV/SickRage/archive/master.zip
But that generated a ssl error in my jail.

So after another google session i found:

Code: Select all

setenv SSL_NO_VERIFY_PEER
Now it was downloading fine.

So my next step was to unpack and move:

Code: Select all

tar -xzf marster.zip
rm master.zip
mv Sickrage-master Sickrage
mv Sickrage /usr/local/share 
Close and save.

The next step was to create a sickbeard startup script:

Code: Select all

ee /etc/rc.d/sickbeard
Paste the following code from https://github.com/SiCKRAGETV/SickRage/blob/master/init.freebsd

Code: Select all

#!/bin/sh
#
# PROVIDE: sickbeard
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# sickbeard_enable (bool): Set to NO by default.
# Set it to YES to enable it.
# sickbeard_user: The user account SickRage daemon runs as what
# you want it to be. It uses '_sabnzbd' user by
# default. Do not sets it as empty or it will run
# as root.
# sickbeard_group: The group account SickRage daemon runs as what
# you want it to be. It uses '_sabnzbd' group by
# default. Do not sets it as empty or it will run
# as wheel.
# sickbeard_dir: Directory where SickRage lives.
# Default: /usr/local/sickbeard
# sickbeard_datadir: Data directory for Sick Beard (DB, Logs, config)
# Default is same as sickbeard_dir
. /etc/rc.subr
name="sickbeard"
rcvar=${name}_enable
load_rc_config ${name}
: ${sickbeard_enable:="NO"}
: ${sickbeard_user:="_sabnzbd"}
: ${sickbeard_group:="_sabnzbd"}
: ${sickbeard_dir:="/usr/local/sickbeard"}
: ${sickbeard_datadir:="${sickbeard_dir}"}
pidfile="/var/run/sickbeard/sickbeard.pid"
command="/usr/local/bin/python2.7"
command_args="${sickbeard_dir}/SickBeard.py --datadir ${sickbeard_datadir} -d --pidfile ${pidfile} --quiet --nolaunch"
start_precmd="sickbeard_prestart"
sickbeard_prestart() {
if [ -f ${pidfile} ]; then
rm -f ${pidfile}
echo "Removing stale pidfile."
elif [ ! -d ${pidfile%/*} ]; then
install -d -o ${sickbeard_user} -g ${sickbeard_group} ${pidfile%/*}
fi
if [ ! -d ${sickbeard_datadir} ]; then
install -d -o ${sickbeard_user} -g ${sickbeard_group} ${sickbeard_datadir}
fi
}
run_rc_command "$1"
Next thing make it executable:

Code: Select all

chmod 755 /etc/rc.d/sickbeard
Now edit /etc/rc.conf:

Code: Select all

ee /etc/rc.conf
And add the following:

Code: Select all

sickbeard_enable="YES"
sickbeard_user="root"
sickbeard_group="wheel"
sickbeard_dir="/usr/local/share/Sickrage/"
sickbeard_datadir="/usr/local/share/Sickrage/"
Replace the user and group with a user u created. (root can really fock up your media lib)

I made some mistakes in the above used a user i didn't created yet and my folder naming was off.
This resulted in not starting of sickrage, the jail log only mentioned failed start.
So if you cannot start, try to run it from command line this way u will see what goes wrong.

Code: Select all

/etc/rc.d/sickbeard start
When I right my wrongs the process was running and i could reach it via http://jailip:8081

I hope this helps another noob, hahah :D
If you see any mistakes or have pointers to improve this how to, feel free to reply !

User avatar
Barnabas
NewUser
NewUser
Posts: 5
Joined: 13 Apr 2014 06:52
Location: Atlanta, GA
Status: Offline

Re: [HOWTO] install Sickrage in my Sabnzbd Jail

Post by Barnabas »

Thanks for posting this. I got mine working with Sabnzbd as well (installed from ports).
Just a FYI for those interested:
I had an error updating Sickrage from the Sickrage web GUI (it would not complete the upgrade and would hang).
Turns out that my python setup was not 100% complete, I needed additional packages to complete the python path to make it work with the shbang #!/usr/bin/env python commonly used in scripts.
I had to install:
1) lang/python2

Code: Select all

cd /usr/ports/lang/python2/ && make install clean
2) lang/python

Code: Select all

cd /usr/ports/lang/python/ && make install clean
Now "#!/usr/bin/env python" works in all my scripts as it should. :D
My NAS
9.2.0.1.972, Fractal Node 304, ASRock C2550D4I, Crucial 16GB ECC, 3x WD Red 3Tb raidZ1

Zoffrany
NewUser
NewUser
Posts: 1
Joined: 07 Mar 2016 20:07
Status: Offline

Re: [HOWTO] install Sickrage in my Sabnzbd Jail

Post by Zoffrany »

Thanks for the post as well. For those wrestling with the unrar issue: UnRar Executable not found. The problem is that unrar is not in the path. I don't know how to properly fix it, but I have a 'dirty' solution:

Code: Select all

pkg install unrar
which unrar
-->/usr/local/bin/unrar

cd [installdir]/sickrage/lib/unrar2
vi unix.py
--> change: 
--> for command in ('unrar', 'rar'):
--> to
--> for command in ('/usr/local/bin/unrar', 'rar'):
Goodluck.

antking3806
NewUser
NewUser
Posts: 7
Joined: 26 Jan 2015 15:29
Status: Offline

Re: [HOWTO] install Sickrage in my Sabnzbd Jail

Post by antking3806 »

I was unable to get the unrar working trying the steps above. even stranger I switched back to a previous ver of Sickrage from my previous NAS4Free setup where the unrar worked but now it doesn't.
Any words of wisdom would be great.

antking3806
NewUser
NewUser
Posts: 7
Joined: 26 Jan 2015 15:29
Status: Offline

Re: [HOWTO] install Sickrage in my Sabnzbd Jail

Post by antking3806 »

I got it working! I deleted the installed unrar pkg and installed unrar 4.x then followed your instructions and it started working. Thanks for the help!

elvincent
NewUser
NewUser
Posts: 4
Joined: 19 Jul 2015 05:24
Status: Offline

Re: [HOWTO] install Sickrage in my Sabnzbd Jail

Post by elvincent »

I'm also a noob, and trying to install sickrage on N4F but I don't intend to use Sabnzbd, can I install it separately and just use the built in bittorrent (Transmission) to download?

jamaroney
Advanced User
Advanced User
Posts: 245
Joined: 13 Aug 2012 17:32
Location: Stroudsburg, PA
Status: Offline

Re: [HOWTO] install Sickrage in my Sabnzbd Jail

Post by jamaroney »

elvincent wrote: I don't intend to use Sabnzbd, can I install it separately and just use the built in bittorrent (Transmission) to download?
Yes

madd0x
NewUser
NewUser
Posts: 1
Joined: 10 Sep 2017 23:06
Status: Offline

Re: [HOWTO] install Sickrage in my Sabnzbd Jail

Post by madd0x »

Hi everyone,

Everything worked perfectly (except for the tiny typo when unzipping the sickrage file) thanks for the great tutorial !

However when trying to start sickbeard, i get the following error.

Code: Select all

Welcome to NAS4Free!
nas4free: ~# service thebrig onestart video
Starting jails: security.jail.enforce_statfs: 0 -> 0
Failed to import required libs, please run 'pip install --user -U -r /usr/local/share/Sickrage/requirements.txt' from console

nas4free: ~# jexec 4 csh
root@video:/ # /etc/rc.d/sickbeard start
Starting sickbeard.
root@video:/ #
I can't figure out why this doesn't work when the jail starts while the same command works when used straight after booting up the jail.

Any help ?

Maddox

Post Reply

Return to “Jails”