SOLVED How to run a command on jail start?

Status
Not open for further replies.

scinas

Cadet
Joined
May 25, 2017
Messages
3
Hello guys, I have set up freenas in a machine, and configured a couple of plugins with it, like transmission and couchpotato, however, neither sickrage nor sickbeard plugins seem to work, so I decided to manually create a jail and install it in there.

Everything works fine, except every time I turn on my NAS (It is not running 24/7), I need to manually ssh to it, find the jail with jls, then jexec inside of it and finally run sickrage with:

python SickRage/SickBeard.py -d

And I cannot, for the life of me, find a way to have the jail automatically run it when it starts... I have search everywhere, and came up with this:

a script in /etc/rc.d/sickrage with:

Code:
#!/bin/sh 

. /etc/rc.subr 

name="sickrage" 
rcvar="sickrage_enable" 
command=/SickRage/SickBeard.py 
command_interpreter=python2.7 
start_cmd="/usr/sbin/daemon $command" 

load_rc_config $name 
run_rc_command "$1"


and an entry in /etc/rc.conf at the bottom with:

sickrage_enable="YES"


running "/etc/rc.d/sickrage start" works perfectly, even status and stop. But it won't automatically start when the jail comes up...

Can someone point me at what am I missing?

Thank you very much in advance.
 

scinas

Cadet
Joined
May 25, 2017
Messages
3
Thanks a lot, that worked... must have been some permission issue or something... I wish there was an error log or something that gave me any hints...
 
Status
Not open for further replies.
Top