Resource icon

FN11.3 iocage jails - Plex, Tautulli, Sonarr, Radarr, Lidarr, Jackett, Transmission, Organizr

OGCleric

Cadet
Joined
Aug 11, 2017
Messages
2
It is not actually running as root you can check this for yourself by looking at the user the process is running as iocage exec jackett ps aux.
Code:
root@freenas:~ # iocage exec jackett ps aux
USER	  PID %CPU %MEM	VSZ	RSS TT  STAT STARTED	TIME COMMAND
root	26408  0.0  0.0  10500   1932  -  IsJ  14:46   0:00.00 /usr/sbin/syslogd -c -ss
root	26469  0.0  0.0  12592   1948  -  SsJ  14:46   0:00.00 /usr/sbin/cron -J 15 -s
jackett 26547  0.0  0.0  10468   1624  -  IsJ  14:46   0:00.00 daemon: /usr/local/bin/mono[26548] (daemon)
jackett 26548  0.0  0.8 240380 128012  -  SJ   14:46   0:02.26 /usr/local/bin/mono /usr/local/share/Jackett/JackettConsole.exe -d /config (mono-sgen)
root	32198  0.0  0.0  21288   2124  2  R+J  15:17   0:00.00 ps aux

I've opened an issue on the github for jackett that this is not functioning correctly on FreeBSD.

Issue: https://github.com/Jackett/Jackett/issues/2419
Test for root: https://github.com/Jackett/Jackett/commit/05d57980465265fa42c349df1c5b1acf28000ba0

Pentalfake, thank you so much for the quick reply. Awesome then I have no issues to worry about then. Once again thanks for this AWESOME guide!!!!!
 

BrianT

Cadet
Joined
Jan 3, 2017
Messages
2
Does anyone else have an issue with Plex and getting an indirect connection when using https://app.plex.tv to access the iocage jail instance? I previously had this issue with the old warden jail instance but resolved it by adding a custom option in pfSense for the DNS Resolver (unbound) service: server: private-domain: "plex.direct" to exclude it from DNS rebinding protection. That setting should still work for the new iocage jail but for the life of me I cannot seem to get it working. If I go to the IP directly its secure, using a direct connection and works just like it should. Accessing remotely works as well so the NAT'ing is set correctly. Its just internally using https://app.plex.tv that's having the problem. As another test I created a new fresh install of Plex in a warden jail and added a new port forward rule in pfSense and it works just fine internally and externally. It seems like there might be some difference in the way the iocage jail is set up maybe in the way VNET is being used (though I tried Shared IP and it still wasn't working either). I noticed that one difference is nd6 options though I cannot find a lot of information on exactly what that is. Its set to nd6 options=1 on the new instance and nd6 options=9 on the old one. Any thoughts on what I can look at? Thanks!

iocage jail:
Code:
ifconfig:
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
		options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
		inet6 ::1 prefixlen 128
		inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
		inet 127.0.0.1 netmask 0xff000000
		nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
		groups: lo
vnet0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
		options=8<VLAN_MTU>
		ether 02:ff:60:14:fa:0a
		hwaddr 02:95:e0:00:0f:0b
		inet 172.25.1.51 netmask 0xffffff00 broadcast 172.25.1.255
		nd6 options=1<PERFORMNUD>
		media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
		status: active
		groups: epair

rc.conf:
sshd_enable="YES"
ifconfig_vnet0="DHCP"
host_hostname="plex"
cron_flags="$cron_flags -J 15"

# Disable Sendmail by default
sendmail_enable="NONE"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"

# Run secure syslog
syslogd_flags="-c -ss"

# Enable IPv6
ipv6_activate_all_interfaces="YES"
plexmediaserver_plexpass_enable="YES"
plexmediaserver_plexpass_support_path="/config"


warden jail:
Code:
ifconfig:
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
		options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
		inet6 ::1 prefixlen 128
		inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
		inet 127.0.0.1 netmask 0xff000000
		nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
epair9b: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
		options=8<VLAN_MTU>
		ether 02:9a:72:00:0c:0b
		inet 172.25.1.19 netmask 0xffffff00 broadcast 172.25.1.255
		nd6 options=9<PERFORMNUD,IFDISABLED>
		media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
		status: active

rc.conf:
portmap_enable="NO"
sshd_enable="YES"
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
hostname="plexmediaserver_1"
devfs_enable="YES"
devfs_system_ruleset="devfsrules_common"
inet6_enable="YES"
ip6addrctl_enable="YES"
plexmediaserver_support_path="/var/db/plexdata"
plexmediaserver_enable="YES"
 
Last edited:

ezra

Contributor
Joined
Jan 15, 2015
Messages
124
Woow i finally figured out why plexmediaserver-plexpass did not work (wouldnt show up in my server list) after setting all the config right in the settings tab.

It seems setting SSL to required breaks Plex, cant access the server anymore.
Setting it to preffered wont help, you can connect to https but still the server wont show.

Anyone any idea how to fix this?

edit: Seems the normal non plexpass version also breaks.

Does anyone else have an issue with Plex and getting an indirect connection when using https://app.plex.tv to access the iocage jail instance? I previously had this issue with the old warden jail instance but resolved it by adding a custom option in pfSense for the DNS Resolver (unbound) service: server: private-domain: "plex.direct" to exclude it from DNS rebinding protection. That setting should still work for the new iocage jail but for the life of me I cannot seem to get it working. If I go to the IP directly its secure, using a direct connection and works just like it should. Accessing remotely works as well so the NAT'ing is set correctly. Its just internally using https://app.plex.tv that's having the problem. As another test I created a new fresh install of Plex in a warden jail and added a new port forward rule in pfSense and it works just fine internally and externally. It seems like there might be some difference in the way the iocage jail is set up maybe in the way VNET is being used (though I tried Shared IP and it still wasn't working either). I noticed that one difference is nd6 options though I cannot find a lot of information on exactly what that is. Its set to nd6 options=1 on the new instance and nd6 options=9 on the old one. Any thoughts on what I can look at? Thanks!

I do get unwanted connections to plex indeed. Trying for a way to block all access to plex servers for privacy reasons. I have OPNsense, do you have some pointers?
 
Last edited:
Joined
Dec 10, 2016
Messages
1
Does anyone else have an issue with Plex and getting an indirect connection when using https://app.plex.tv to access the iocage jail instance? I previously had this issue with the old warden jail instance but resolved it by adding a custom option in pfSense for the DNS Resolver (unbound) service: server: private-domain: "plex.direct" to exclude it from DNS rebinding protection. That setting should still work for the new iocage jail but for the life of me I cannot seem to get it working. If I go to the IP directly its secure, using a direct connection and works just like it should. Accessing remotely works as well so the NAT'ing is set correctly. Its just internally using https://app.plex.tv that's having the problem. As another test I created a new fresh install of Plex in a warden jail and added a new port forward rule in pfSense and it works just fine internally and externally. It seems like there might be some difference in the way the iocage jail is set up maybe in the way VNET is being used (though I tried Shared IP and it still wasn't working either). I noticed that one difference is nd6 options though I cannot find a lot of information on exactly what that is. Its set to nd6 options=1 on the new instance and nd6 options=9 on the old one. Any thoughts on what I can look at? Thanks!

iocage jail:
Code:
ifconfig:
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
		options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
		inet6 ::1 prefixlen 128
		inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
		inet 127.0.0.1 netmask 0xff000000
		nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
		groups: lo
vnet0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
		options=8<VLAN_MTU>
		ether 02:ff:60:14:fa:0a
		hwaddr 02:95:e0:00:0f:0b
		inet 172.25.1.51 netmask 0xffffff00 broadcast 172.25.1.255
		nd6 options=1<PERFORMNUD>
		media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
		status: active
		groups: epair

rc.conf:
sshd_enable="YES"
ifconfig_vnet0="DHCP"
host_hostname="plex"
cron_flags="$cron_flags -J 15"

# Disable Sendmail by default
sendmail_enable="NONE"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"

# Run secure syslog
syslogd_flags="-c -ss"

# Enable IPv6
ipv6_activate_all_interfaces="YES"
plexmediaserver_plexpass_enable="YES"
plexmediaserver_plexpass_support_path="/config"


warden jail:
Code:
ifconfig:
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
		options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
		inet6 ::1 prefixlen 128
		inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
		inet 127.0.0.1 netmask 0xff000000
		nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
epair9b: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
		options=8<VLAN_MTU>
		ether 02:9a:72:00:0c:0b
		inet 172.25.1.19 netmask 0xffffff00 broadcast 172.25.1.255
		nd6 options=9<PERFORMNUD,IFDISABLED>
		media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
		status: active

rc.conf:
portmap_enable="NO"
sshd_enable="YES"
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
hostname="plexmediaserver_1"
devfs_enable="YES"
devfs_system_ruleset="devfsrules_common"
inet6_enable="YES"
ip6addrctl_enable="YES"
plexmediaserver_support_path="/var/db/plexdata"
plexmediaserver_enable="YES"

Yeah, same here Brian. In fact, it's also an indirect connection with the PS4 app which I assume is because it needs connectivity to plex.tv to find the Plex server. I've also noticed that streams through the PS4 app will timeout and are followed by "The video did not start playing in time". Disabling DNS rebinding checks on pfsense didn't help either.
 

BrianT

Cadet
Joined
Jan 3, 2017
Messages
2
Yeah, same here Brian. In fact, it's also an indirect connection with the PS4 app which I assume is because it needs connectivity to plex.tv to find the Plex server. I've also noticed that streams through the PS4 app will timeout and are followed by "The video did not start playing in time". Disabling DNS rebinding checks on pfsense didn't help either.
Thanks for confirming its not just me astromonkey. Still not sure what to test... might just have to wait for 11.2 and the "official" release.
 

Wim Mistiaen

Dabbler
Joined
Mar 21, 2015
Messages
22
Thank you very much! I followed your previous guide that was doing this in warder jails, and it looks like I'll be using it to migrate to the new iocage jails too, rather than using the upgrade script promised to us.

fingers crossed for a smooth migration!
 

Celena

Dabbler
Joined
Dec 6, 2016
Messages
13
Does anyone else have an issue with Plex and getting an indirect connection when using https://app.plex.tv to access the iocage jail instance? I previously had this issue with the old warden jail instance but resolved it by adding a custom option in pfSense for the DNS Resolver (unbound) service: server: private-domain: "plex.direct" to exclude it from DNS rebinding protection. That setting should still work for the new iocage jail but for the life of me I cannot seem to get it working. If I go to the IP directly its secure, using a direct connection and works just like it should. Accessing remotely works as well so the NAT'ing is set correctly. Its just internally using https://app.plex.tv that's having the problem. As another test I created a new fresh install of Plex in a warden jail and added a new port forward rule in pfSense and it works just fine internally and externally. It seems like there might be some difference in the way the iocage jail is set up maybe in the way VNET is being used (though I tried Shared IP and it still wasn't working either). I noticed that one difference is nd6 options though I cannot find a lot of information on exactly what that is. Its set to nd6 options=1 on the new instance and nd6 options=9 on the old one. Any thoughts on what I can look at? Thanks!

iocage jail:
Code:
ifconfig:
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
		options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
		inet6 ::1 prefixlen 128
		inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
		inet 127.0.0.1 netmask 0xff000000
		nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
		groups: lo
vnet0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
		options=8<VLAN_MTU>
		ether 02:ff:60:14:fa:0a
		hwaddr 02:95:e0:00:0f:0b
		inet 172.25.1.51 netmask 0xffffff00 broadcast 172.25.1.255
		nd6 options=1<PERFORMNUD>
		media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
		status: active
		groups: epair

rc.conf:
sshd_enable="YES"
ifconfig_vnet0="DHCP"
host_hostname="plex"
cron_flags="$cron_flags -J 15"

# Disable Sendmail by default
sendmail_enable="NONE"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"

# Run secure syslog
syslogd_flags="-c -ss"

# Enable IPv6
ipv6_activate_all_interfaces="YES"
plexmediaserver_plexpass_enable="YES"
plexmediaserver_plexpass_support_path="/config"


warden jail:
Code:
ifconfig:
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
		options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
		inet6 ::1 prefixlen 128
		inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
		inet 127.0.0.1 netmask 0xff000000
		nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
epair9b: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
		options=8<VLAN_MTU>
		ether 02:9a:72:00:0c:0b
		inet 172.25.1.19 netmask 0xffffff00 broadcast 172.25.1.255
		nd6 options=9<PERFORMNUD,IFDISABLED>
		media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
		status: active

rc.conf:
portmap_enable="NO"
sshd_enable="YES"
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
hostname="plexmediaserver_1"
devfs_enable="YES"
devfs_system_ruleset="devfsrules_common"
inet6_enable="YES"
ip6addrctl_enable="YES"
plexmediaserver_support_path="/var/db/plexdata"
plexmediaserver_enable="YES"

Hello i had this problem and solved; but i don't know which action i've done is the solution.
 

bwegrzyn

Dabbler
Joined
Jan 2, 2018
Messages
11
I have this same issue with the Plex server being indirect, or even only available remotely.

I seem to be able to get around it by turning off vnet and setting a static IP to the jail, but no dice with vnet=on and dhcp=on. This is less than ideal for me as I prefer to manage DHCP reservations on my router instead of manually assigning IPs all over the place, but I haven't found any other solution. It just seems like Plex and iocage/vnet/dhcp dont like to play together.
 

Pentaflake

Explorer
Joined
Jul 8, 2014
Messages
91
I have this same issue with the Plex server being indirect, or even only available remotely.

I seem to be able to get around it by turning off vnet and setting a static IP to the jail, but no dice with vnet=on and dhcp=on. This is less than ideal for me as I prefer to manage DHCP reservations on my router instead of manually assigning IPs all over the place, but I haven't found any other solution. It just seems like Plex and iocage/vnet/dhcp dont like to play together.
Thanks for confirming its not just me astromonkey. Still not sure what to test... might just have to wait for 11.2 and the "official" release.
I do get unwanted connections to plex indeed. Trying for a way to block all access to plex servers for privacy reasons. I have OPNsense, do you have some pointers?
Yeah, same here Brian. In fact, it's also an indirect connection with the PS4 app which I assume is because it needs connectivity to plex.tv to find the Plex server. I've also noticed that streams through the PS4 app will timeout and are followed by "The video did not start playing in time". Disabling DNS rebinding checks on pfsense didn't help either.

I use static IPs for all of the iails and I use vnet as it is required for my networking setup, however I have't seen this issue or any of the issues seen above with PS4 clients (with required encryption). I do not use the auto upnp port opening for remote access in plex as it isn't an option with my firewall. Other then that and required encryption that is the only change from defaults in plex in regards to remote access.

If you guys are still having issues after trying with vnet and a static ip, it may an issue with your actual networking setup on your network or with your configuration of plex. If its an issue with plex or how you setup your port forwarding for plex the best place to get assistance would be the plex forums.
 

bwegrzyn

Dabbler
Joined
Jan 2, 2018
Messages
11
I've posted an issue on the iocage github, maybe someone will be able to shed some light there... https://github.com/iocage/iocage/issues/470

I've noticed that with vnet=on (regardless of static IP or dhcp), Plex will not be able to find its local IP address and will always get listed as "remote" or "indirect". I can turn off vnet and it will properly see its local IP address and update https://plex.tv/pms/resources.xml, but now I cannot access Plex interface on <IP>:32400/web.
 

Celena

Dabbler
Joined
Dec 6, 2016
Messages
13
I've posted an issue on the iocage github, maybe someone will be able to shed some light there... https://github.com/iocage/iocage/issues/470

I've noticed that with vnet=on (regardless of static IP or dhcp), Plex will not be able to find its local IP address and will always get listed as "remote" or "indirect". I can turn off vnet and it will properly see its local IP address and update https://plex.tv/pms/resources.xml, but now I cannot access Plex interface on <IP>:32400/web.

Extremely Strange i'm with vnet=on with static IP or DHCP, i'm not "remote" or "indirect"
i remember i have set this :
Code:
iocage set resolver="search mydomainname.com;nameserver ROUTERIP" Plex
iocage set host_domainname="mydomainname.com" Plex
iocage set host_hostname="plex.mydomainname.com" Plex
iocage set allow_set_hostname="0" Plex
mydomainname.com = my domain; i don't know what to put if you don't have one

But i'm sure before set this and all test it was remote
 

MoonPie

Dabbler
Joined
Dec 13, 2014
Messages
20
Okay guys for what it is worth. I am a noob so this might not be of any interest to anyone else but here we go... A few tips I have found:

  • OMBI hangs when shutting down (mono-sgen) - to avoid this I put the below shutdown snippet in my rc.d ombi script above the run_rc_command.
stop_precmd=ombi_prestopcmd
ombi_prestopcmd() {
killall -ABRT mono-sgen
}
  • eliminate need to remember port numbers for jails- install socat (pkg install socat) in each jail and update rc.conf wtih the below commands.

iocage exec <jail> sysrc "socat_enable=YES"
iocage exec <jail> sysrc "socat_flags=TCP-LISTEN:80,fork TCP:127.0.0.1:<port number>"

Now instead of http://<jail [name | ip]>:<port number> you can simple use http://<jail [name | ip]>

Hope this helps and works. I have been using it for awhile with Ombi, Radarr, Sonarr, Plex, Transmission, NZBGet and had no trouble. In order to use jail name you need a DNS entry with the appropriate IP assignment.
 

JimM

Cadet
Joined
Jul 16, 2017
Messages
1
I was never able to get Radarr running in a jail under the warden system. I wanted to give radarr another try using the iocage instructions. When I followed the steps, I made appropriate changes to match my IP, mask, storage location, etc. I keep my jails in a different pool (SSDPool) than my data (HDDPool), and what I found was that the iocage commands do not follow the gui setting for where to locate jails. It created an iocage dataset in my data pool. Is there a way to indicate where to install iocage jails (i.e. HDDPool vs. SSDPool) from the CLI? Or is it easier to create the iocage jail using the new UI and continue from there using SSH or the console?
 

ThreeDee

Guru
Joined
Jun 13, 2013
Messages
700
Plexpy up and working great using putty.. now I just need to setup Plex in an iocage jail and I'm golden .. first attempt failed because I am not sure what to mount.. but I'll be messing with it some more later
 

wywywywy

Dabbler
Joined
Jun 1, 2014
Messages
32
Hi.

Where can I find the old 11.0 version of this guide please?

I can't find it anywhere...

Thanks.
 

jmcguire525

Explorer
Joined
Oct 10, 2017
Messages
94
This guide has been a lifesaver but being a complete newb I'm still a little lost on creating the rc files. Is this how it should be done...?

1. Follow all previous steps
2.
Code:
iocage console sonarr

3.
Code:
cd /usr/local/etc/rc.d/sonarr

4.
Code:
cat > rc.conf

5.
Code:
ee rc.conf

6. After that I paste the text in and save, but does any of it need to be edited? (example: sonarr_enable:="YES") ?

Code:
. /etc/rc.subr
name=sonarr
rcvar=${name}_enable
load_rc_config $name

: ${sonarr_enable:="NO"}
: ${sonarr_user:="sonarr"}
: ${sonarr_group:="sonarr"}
: ${sonarr_data_dir:="/config"}

pidfile="${sonarr_data_dir}/nzbdrone.pid"
command="/usr/sbin/daemon"
procname="/usr/local/bin/mono"
command_args="-f ${procname} /usr/local/share/NzbDrone/NzbDrone.exe --data=${sonarr_data_dir} --nobrowser"

start_precmd=sonarr_precmd
sonarr_precmd() {
	if [ ! -d ${sonarr_data_dir} ]; then
	install -d -o ${sonarr_user} -g ${sonarr_group} ${sonarr_data_dir}
	fi

	export XDG_CONFIG_HOME=${sonarr_data_dir}
}

run_rc_command "$1"



7. Add lines to /etc/rc.conf.local or /etc/rc.conf... So just ee rc.conf and add lines?
sonarr_enable: YES
sonarr_user: media
sonarr_group: media
sonarr_data_dir: /var/db/sonarr
8. Finish with iocage commands as instructed
 

Wolfeman0101

Patron
Joined
Jun 14, 2012
Messages
428
This guide has been a lifesaver but being a complete newb I'm still a little lost on creating the rc files. Is this how it should be done...?

1. Follow all previous steps
2.
Code:
iocage console sonarr

3.
Code:
cd /usr/local/etc/rc.d/sonarr

4.
Code:
cat > rc.conf

5.
Code:
ee rc.conf

6. After that I paste the text in and save, but does any of it need to be edited? (example: sonarr_enable:="YES") ?

Code:
. /etc/rc.subr
name=sonarr
rcvar=${name}_enable
load_rc_config $name

: ${sonarr_enable:="NO"}
: ${sonarr_user:="sonarr"}
: ${sonarr_group:="sonarr"}
: ${sonarr_data_dir:="/config"}

pidfile="${sonarr_data_dir}/nzbdrone.pid"
command="/usr/sbin/daemon"
procname="/usr/local/bin/mono"
command_args="-f ${procname} /usr/local/share/NzbDrone/NzbDrone.exe --data=${sonarr_data_dir} --nobrowser"

start_precmd=sonarr_precmd
sonarr_precmd() {
	if [ ! -d ${sonarr_data_dir} ]; then
	install -d -o ${sonarr_user} -g ${sonarr_group} ${sonarr_data_dir}
	fi

	export XDG_CONFIG_HOME=${sonarr_data_dir}
}

run_rc_command "$1"



7. Add lines to /etc/rc.conf.local or /etc/rc.conf... So just ee rc.conf and add lines?
sonarr_enable: YES
sonarr_user: media
sonarr_group: media
sonarr_data_dir: /var/db/sonarr
8. Finish with iocage commands as instructed
The rcfile is /usr/local/etc/rc.d/sonarr inside the jail. So just run
Code:
ee /usr/local/etc/rc.d/sonarr

and paste
Code:
#!/bin/sh

# $FreeBSD$
#
# PROVIDE: sonarr
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# sonarr_enable:	Set to YES to enable sonarr
#			Default: NO
# sonarr_user:	The user account used to run the sonarr daemon.
#			This is optional, however do not specifically set this to an
#			empty string as this will cause the daemon to run as root.
#			Default: media
# sonarr_group:	The group account used to run the sonarr daemon.
#			This is optional, however do not specifically set this to an
#			empty string as this will cause the daemon to run with group wheel.
#			Default: media
# sonarr_data_dir:	Directory where sonarr configuration
#			data is stored.
#			Default: /var/db/sonarr

. /etc/rc.subr
name=sonarr
rcvar=${name}_enable
load_rc_config $name

: ${sonarr_enable:="NO"}
: ${sonarr_user:="sonarr"}
: ${sonarr_group:="sonarr"}
: ${sonarr_data_dir:="/config"}

pidfile="${sonarr_data_dir}/nzbdrone.pid"
command="/usr/sbin/daemon"
procname="/usr/local/bin/mono"
command_args="-f ${procname} /usr/local/share/NzbDrone/NzbDrone.exe --data=${sonarr_data_dir} --nobrowser"

start_precmd=sonarr_precmd
sonarr_precmd() {
	if [ ! -d ${sonarr_data_dir} ]; then
	install -d -o ${sonarr_user} -g ${sonarr_group} ${sonarr_data_dir}
	fi

	export XDG_CONFIG_HOME=${sonarr_data_dir}
}

run_rc_command "$1"


Then just run
Code:
chmod u+x /usr/local/etc/rc.d/sonarr
sysrc "sonarr_enable=YES"
sonarr service sonarr start


If you don't want your DB in /config change this line in /usr/local/etc/rc.d/sonarr or change the user to media but the guide sets the user as sonarr
Code:
: ${sonarr_data_dir:="/config"}


You shouldn't need to edit the rc.conf.
 

Wolfeman0101

Patron
Joined
Jun 14, 2012
Messages
428
For NZBGet I don't have a file /etc/ssl/cert.pem so I can't connect to my newsgroup via SSL. Any ideas?
 
Top