Smoerrebroed
Cadet
- Joined
- Jan 29, 2022
- Messages
- 3
Hi All,
first off: I have searched through the forums quite a bit, but so far I haven't found a solution that works for me, so hopefully I can get to something workable by posting this. If I have overlooked anything, please accept my apologies.
The title says it all: I am looking for a way to start a Java application (SteVe, to be precise) inside a jail when that jail starts up. What seems to be causing (some of) the problems is the fact that this application is outputting both to stdout and to stderr, and it doesn't come with a built-in daemon mode, so the only way to start it up is by issuing
What I have tried so far:
So, the question is: What am I missing here? Is there any foolproof way of doing this? Any advice will be highly appreciated. Many thanks in advance!
Smoerrebroed
first off: I have searched through the forums quite a bit, but so far I haven't found a solution that works for me, so hopefully I can get to something workable by posting this. If I have overlooked anything, please accept my apologies.
The title says it all: I am looking for a way to start a Java application (SteVe, to be precise) inside a jail when that jail starts up. What seems to be causing (some of) the problems is the fact that this application is outputting both to stdout and to stderr, and it doesn't come with a built-in daemon mode, so the only way to start it up is by issuing
$ java -jar steve.jar
What I have tried so far:
- Putting the startup command as exec_poststart in the jail
- Putting the startup command into /etc/rc.local
- Creating a script in /etc/rc.d
- Running it as a post-init command from TrueNAS
- All of the above I have tried with and without various redirections, backgrounding and
nohup
modifiers. - Also, because it would actually be helpful to reattach to the running process in a terminal, I have tried
screen
as well. (Looks like this fails due to the lack of a PTY IIUIC.
So, the question is: What am I missing here? Is there any foolproof way of doing this? Any advice will be highly appreciated. Many thanks in advance!
Smoerrebroed