Easy way to start a Script (In a Jail) on boot?

Grinchy

Explorer
Joined
Aug 5, 2017
Messages
78
Hello,

I'm trying to get my Script to start at boot :-(

It's a simple Script, that just has to execute "cd /MyNovel && narou web" on startup. It's a Python App that gets started with "narou web" in the "/MyNovel" Folder.

With Freenas 11 I got it working by using /etc/crontab. But since TrueNas 12 the Python App seems to start on boot like before, but there a errors while converting Files (narou converts Japanese .epub -> .mobi files).

If I start the Python App manually using the "cd /MyNovel && narou web" command in PuTTy, it works fine. There just seems to be a problem using the Autostart with /etc/crontab.

So I'm searching for a easy way to start this Script at boot. Already tried it with /etc/rc.d but can't it get working ...
 

Alecmascot

Guru
Joined
Mar 18, 2014
Messages
1,177
Have an init script that invokes iocage exec....

Code:
Usage: iocage exec [OPTIONS] JAIL [COMMAND]...

  Run a command inside a specified jail.

Options:
  -u, --host_user TEXT  The host user to use.
  -U, --jail_user TEXT  The jail user to use.
  -f, --force           Start the jail if it's not running.
  --help                Show this message and exit.
 
Top