Sickchill IOCage

Bruce Wilfong

Explorer
Joined
Mar 25, 2016
Messages
85
As I have been converting over all my warden to IOCage, doing a ton of researching I never found a good Guide for SickChill (aka sickrage). Well its not pretty and could use some nice clean-up from someone with more experience but I got it working with my media share and sabnzbd

my path is /mnt/zp1/ similar to /mnt/tank/ use whatever you have as a path.

#SickChill

#Create a Jail Named SickChill - change IP, defaultrouter as needed

Code:
echo '{"pkgs":["lang/python27","databases/py-sqlite3","security/ca_root_nss","curl"]}' > /tmp/pkg.json
iocage create -n "sickchill" -p /tmp/pkg.json -r 11.2-RELEASE ip4_addr="vnet0|192.168.1.25/24" defaultrouter="192.168.1.1" vnet="on" allow_raw_sockets="1" boot="on"
rm /tmp/pkg.json


#In Freenas GUI - Add a user named sickchill ID as 8020 then add it to the media group that owns your Media share.
{someone could probably do some niffty code here but this is how I did it}

## Create Mounts & directories, this assumes you are using sabnzbd
Code:
iocage exec sickchill "mkdir -p /mnt/sabnzbd"
iocage exec sickchill "mkdir -p /mnt/media"


## Mounts & directories
Code:
iocage fstab -a sickchill /mnt/zp1/sabnzbd /mnt/sabnzbd nullfs rw 0 0
iocage fstab -a sickchill /mnt/zp1/media /mnt/media nullfs rw 0 0


#Add a user and install sickchill
Code:
iocage exec sickchill "pw user add sickchill -c sickchill -u 8020 -d /nonexistent -s /usr/bin/nologin"
iocage exec sickchill "fetch https://github.com/SickChill/SickChill/archive/master.tar.gz"
iocage exec sickchill "tar xfz master.tar.gz -C /usr/local/"


# This may not be necessary but when I downloaded and tar'ed the file it needed a name change from SickChill-master to just sickchill.
#Look in usr/local/ for SickChill-master, use the commands below to check
Code:
iocage exec sickchill
cd /usr/local/
ll


#Check to see what the naming is, then exit
Code:
cd /
exit


#If you see anything other than /usr/local/sickchill then do the following:
Code:
iocage exec sickchill "mv /usr/local/SickChill-master /usr/local/sickchill"
iocage exec sickchill chown -R sickchill:sickchill /usr/local/sickchill


# Enable SickChill
Code:
iocage exec sickchill mkdir /usr/local/etc/rc.d
iocage exec sickchill sysrc -f /etc/rc.conf sickchill_enable="YES"


# Copy over the script.
Code:
iocage exec sickchill cp /usr/local/sickchill/runscripts/init.freebsd /usr/local/etc/rc.d/sickchill
iocage exec sickchill chmod +x /usr/local/etc/rc.d/sickchill


# You can edit here if you like but not necessary. If someone wants to edit the script better so /config can be in the /apps/sickchill that would be nice, I couldnt figure it out.
Code:
iocage exec sickchill ee /usr/local/etc/rc.d/sickchill

# To exit edit press: ESC then ENTER to exit

# Start the service
Code:
iocage exec sickchill service sickchill start


#Go to your IP address: Port is 8081. then Update through the SickChill GUI
192.168.1.25:8081
 
Last edited:

hertzsae

Contributor
Joined
Sep 23, 2014
Messages
118
Thank you!!! I had been unable to get sickchill working, so I tried to switch to medusa. Got it installed and running, but it didn't want to import my sickchill database. Your guide with some tweaks based on what I did with medusa got me up and running.

It looks like you'd like to have your config hosted in a proper location. You don't edit /usr/local/etc/rc.d/sickchill. That file is just telling you what switches you can put in the rc.conf file. If you want your config at /config, then run "iocage exec sickchill sysrc sickchill_datadir=/config".

I'm also not an expert and I'm sure this can be improved, but here's the steps I used:
# Use the bash shell
bash
# Create the jail
iocage create -n "sickchill" -r 11.2-RELEASE interfaces="vnet0:bridge0" defaultrouter="none" vnet="on" dhcp="on" bpf="yes" allow_raw_sockets="1" boot="on"

# Update to the latest repo and make sure it prints "FreeBSD: {url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest"}"
iocage exec sickchill "mkdir -p /usr/local/etc/pkg/repos"
iocage exec sickchill "echo 'FreeBSD: {url: \"pkg+http://pkg.FreeBSD.org/\${ABI}/latest\"}' > /usr/local/etc/pkg/repos/FreeBSD.conf"
iocage exec sickchill cat /usr/local/etc/pkg/repos/FreeBSD.conf

iocage exec sickchill pkg update
iocage exec sickchill pkg upgrade -y

# Install sickchill and dependencies
iocage exec sickchill pkg install -y python27 databases/py-sqlite3 security/ca_root_nss py27-openssl

# Mount storage and config
iocage fstab -a sickchill /mnt/Vol1/media /media nullfs rw 0 0
iocage exec sickchill mkdir -p /var/db/sickchill
iocage fstab -a sickchill /mnt/Vol1/jail_config_data/sickchill /var/db/sickchill nullfs rw 0 0

# Create media
iocage exec sickchill "pw groupadd media -g 816"
iocage exec sickchill "pw useradd -n media -u 1001 -d /nonexistent -s /usr/sbin/nologin"

iocage exec sickchill "fetch https://github.com/SickChill/SickChill/archive/master.tar.gz"
iocage exec sickchill "tar xfz master.tar.gz -C /usr/local/"

# Change name from SickChill-master to just sickchill
iocage exec sickchill ls -al /usr/local/
iocage exec sickchill "mv /usr/local/SickChill-master /usr/local/sickchill"

#copy settings and db from old (commented out, only used once)
# cp -r /mnt/Vol1/pluginjails/sickrage_1/var/db/sickrage/* /mnt/Vol1/jail_config_data/sickchill/

# Set permissions on install and config
iocage exec sickchill chown -R media:media /usr/local/sickchill
iocage exec sickchill chown -R media:media /var/db/sickchill

# Set rc.conf for proper user/group, data directory and enable service
iocage exec sickchill sysrc sickchill_user=media
iocage exec sickchill sysrc sickchill_group=media
iocage exec sickchill sysrc sickchill_datadir=/var/db/sickchill
iocage exec sickchill sysrc sickchill_enable=YES

# I'm pretty sure this line isn't needed as it is default, but I put it in while troubleshooting, so leaving it here in case
iocage exec sickchill sysrc sickchill_dir=/usr/local/sickchill

# Disable IPv6 (for my personal install)
iocage exec sickchill vi /etc/rc.conf

# Copy over the script.
iocage exec sickchill mkdir /usr/local/etc/rc.d
iocage exec sickchill cp /usr/local/sickchill/runscripts/init.freebsd /usr/local/etc/rc.d/sickchill
iocage exec sickchill chmod +x /usr/local/etc/rc.d/sickchill

# Start the service
iocage exec sickchill service sickchill start

## Install complete

# Stop the service if needed
iocage exec sickchill service sickchill stop

# Take snapshots before GUI upgrade
zfs snapshot -r Vol1/jail_config_data/sickchill@SickChillUpgrade-`date +%Y%m%d`
zfs snapshot -r Vol1/iocage/jails/sickchill@SickChillUpgrade-`date +%Y%m%d`
 
Last edited:

msbxa

Contributor
Joined
Sep 21, 2014
Messages
151
Do you know you can install Sickchill as a plugin? here is the instructions and guide:

https://www.ixsystems.com/blog/february-plugin-updates-and-new-plugins-for-testing/

New Plugins Ready for Testing
To install a testing plugin, you will need the latest copy of the iocage-ix-plugins git repository. If you have never cloned this repository from your FreeNAS system, run this command from Shell:
git clone https://github.com/freenas/iocage-ix-plugins
Then, change to that directory:
cd iocage-ix-plugins
While in the iocage-ix-plugins directory, you can install the desired testing plugin using the command specified for that plugin. Once a testing plugin is installed, it will be added to the Plugins → Installed Plugins page of the UI where it can be managed like any other plugin.

Install Sickchill
DHCP=On
iocage fetch -P -n ./sickchill.json dhcp=on bpf=yes vnet=on --accept

DHCP=Off, STATIC=ON
iocage fetch -P -n ./sickchill.json ip4_addr="vnet0|192.168.1.47/24" defaultrouter="192.168.1.1" bpf=yes vnet=on --accept
 
Last edited:

Bruce Wilfong

Explorer
Joined
Mar 25, 2016
Messages
85
hertzsae - what does "bash" do ?

msbxa - this is awesome, wish I saw this awhile ago, thanks
 
Last edited:

hertzsae

Contributor
Joined
Sep 23, 2014
Messages
118
Bruce,
That loads the bash shell which is the shell I used to run the commands. A shell is the program that runs the command line. I think mine used to default to csh and it wouldn't correctly pass the line starting with "iocage exec sickchill echo". Switching to bash fixed my problems. You can try different shells by running "bash", "csh", "tcsh", "sh" and I'm sure there's a few others. All of them have their own strengths. I don't spend enough time in the unix command line to have a preference. I just know that the bash shell works with the directions I pasted.

msbxa,
That is nice. Do you know if they plan to add "plugins for testing" to the GUI at some point? Would make it more enticing for people to try out.
 

msbxa

Contributor
Joined
Sep 21, 2014
Messages
151
hertzsae,
I am really not sure but i managed to catch these test plugins by reading their email news that keeps comming from time to time. I was also happy to find Unifi Controller plugin that works very well. It seems their more concentrating on improving iocage jails on FreeNAS 11.3 than bringing more plugins. The only problem with FreeNAS 11.3 is that warden jails will be removed completely unless I am mistaken.
 

hertzsae

Contributor
Joined
Sep 23, 2014
Messages
118
I was disappointed when I upgraded to 11.2 and a few of the plugins I had been running didn't have iocage packages available. Over the years I've seen a number of knowledgeable users recommend to just build your own jails over using plugins. I took the lack of gui available plugins as a sign that they may not have a bright future. I decided I'd just bite the bullet and move to building jails from scratch. Fortunately for me, my warden jails ran just fine after upgrading which allowed me to take my time and find something that worked over the next few months. SickChill was my last such plugin. I won't be affected if they kill Warden completely, but I'll feel for those who get stuck on 11.2 (or whatever the last release with Warden is).
 

msbxa

Contributor
Joined
Sep 21, 2014
Messages
151
I am doing a lot of iocage jails testing on FreeNAS 11.2 U5 with installation and migration of Sickchill, couchpotato, Sabnzbd, NZBget, Medusa and Sonarr, Radarr and who knows next just to find the best. While my production is still on FreeNAS 11.1 U7 with warden jails.
 

Bruce Wilfong

Explorer
Joined
Mar 25, 2016
Messages
85
I am doing a lot of iocage jails testing on FreeNAS 11.2 U5 with installation and migration of Sickchill, couchpotato, Sabnzbd, NZBget, Medusa and Sonarr, Radarr and who knows next just to find the best. While my production is still on FreeNAS 11.1 U7 with warden jails.

When you use these plugins do you still need to set all the permission (for example media 8765309) to get everything to work ?
 

msbxa

Contributor
Joined
Sep 21, 2014
Messages
151
I am not good in setting permissions because every time I do add them manually I loose to connect to webGUI. But I successfully managed to make them work with couchpotato and Sickchill without setting these permissions manually but through GUI and use chmod on dataset media instead but I am still exploring. Only Sabnzbd I did add group and user media 8765309
 
Last edited:

hertzsae

Contributor
Joined
Sep 23, 2014
Messages
118
The permissions question really depends on what you're trying to do. If all the post processing is done by the downloader (sabnzbd/nzbget), then it really won't matter what permissions your searching programs (sick/sonarr/couch) have. They don't need permissions, because they aren't modifying any files. On the other hand, many people (like myself) have the searching programs rename, move and cleanup the downloaded files. In that case, you'll have to be a little more diligent with users and groups.

If you're doing the renaming with searchers, then it really depends on what permissions you're using. If everything is set to 777, then you don't need to be diligent, because everyone can do everything. If its all set to 775 (or 770), then you just need to make sure every program's user is in the same group (usually media around these parts). If you're running with a common 755 (or 7XX not 777), then you want to make sure all the programs are running as the same user media:media user. Most of the programs allow specifying the user that the service runs with by a command like "iocage exec sickchill sysrc sickchill_user=media" and the group with "iocage exec sickchill sysrc sickchill_group=media".

Also, I'm not an expert and this is simply the way I believe this all works. Please take what I just wrote with a grain of salt.
 

msbxa

Contributor
Joined
Sep 21, 2014
Messages
151
On the other hand, many people (like myself) have the searching programs rename, move and cleanup the downloaded files. In that case, you'll have to be a little more diligent with users and groups.

If you're doing the renaming with searchers, then it really depends on what permissions you're using. If everything is set to 777, then you don't need to be diligent, because everyone can do everything. If its all set to 775 (or 770), then you just need to make sure every program's user is in the same group (usually media around these parts). If you're running with a common 755 (or 7XX not 777), then you want to make sure all the programs are running as the same user media:media user. Most of the programs allow specifying the user that the service runs with by a command like "iocage exec sickchill sysrc sickchill_user=media" and the group with "iocage exec sickchill sysrc sickchill_group=media".

Also, I'm not an expert and this is simply the way I believe this all works. Please take what I just wrote with a grain of salt.

I am doing the same as you do that’s why it’s little bit tricky.
Thanks appreciated for your explanation and that what I am finding after spending some time testing to understand what you’ve written.
 
Top