I am pretty new to TrueNAS, and by pretty new I mean I had never used it once before yesterday. I built a NAS for a Plex Server and a Minecraft Server, and I've managed to get the Plex Server setup no problem with the plugin. I was originally using the MineOS plugin for the Server, but I found it very limiting and slow, so I tried finding a new way to do it.
I followed this video exactly to install a Server in a Jail:
www.youtube.com
So now if I run minecraft-server in my Shell, the Server starts up and works perfectly, it runs really well and everything. But the problem is, it shuts down as soon as I exit the Shell. The whole point of running this Server on a NAS is so that it can run 24/7, I don't have to have my PC on for it to be online, and this kind of defeats that whole purpose.
If this has already been answered somewhere else I apologize for the duplicate question, but I have literally been trying to get this Server up for the past 14 hours straight and I still can't fix the issue. I've made progress, but I'm just stuck on this last part.
Like I said, all I need to do to start the Server is go into the Shell and run minecraft-server. I don't need to specify a directory or anything like that, just that simple command starts it up. I read all about rc.d files and how they're coded, and made a minecraftd file that I put in both /root/etc/rc.d and /root/usr/local/etc/rc.d because I didn't know which one it should go in. I also made sure to add minecraftd_enable="YES" to my rc.conf file in /root/etc/. I have attached both files as .txt's.
The script itself in minecraftd works fine, the Server will also start if I run the file with /usr/local/etc/rc.d/minecraftd onestart.
But again, the issue is that I have to be in the Shell for the Server to start. "minecraftd" is supposed to start when the Jail itself starts, so the Server will automatically run without me having to do anything. I feel like there has to be some way to do this, some small thing I must be missing, some dumb reason why this won't work.
If there's any help anyone can offer me, it would be very, very appreciated.
I followed this video exactly to install a Server in a Jail:

Easy Minecraft Server on FreeBSD
Installing FreeBSD as a Primary Operating System:https://www.freebsdfoundation.org/freebsd/how-to-guides/installing-freebsd-as-a-primary-operating-system/Ins...

So now if I run minecraft-server in my Shell, the Server starts up and works perfectly, it runs really well and everything. But the problem is, it shuts down as soon as I exit the Shell. The whole point of running this Server on a NAS is so that it can run 24/7, I don't have to have my PC on for it to be online, and this kind of defeats that whole purpose.
If this has already been answered somewhere else I apologize for the duplicate question, but I have literally been trying to get this Server up for the past 14 hours straight and I still can't fix the issue. I've made progress, but I'm just stuck on this last part.
Like I said, all I need to do to start the Server is go into the Shell and run minecraft-server. I don't need to specify a directory or anything like that, just that simple command starts it up. I read all about rc.d files and how they're coded, and made a minecraftd file that I put in both /root/etc/rc.d and /root/usr/local/etc/rc.d because I didn't know which one it should go in. I also made sure to add minecraftd_enable="YES" to my rc.conf file in /root/etc/. I have attached both files as .txt's.
The script itself in minecraftd works fine, the Server will also start if I run the file with /usr/local/etc/rc.d/minecraftd onestart.
But again, the issue is that I have to be in the Shell for the Server to start. "minecraftd" is supposed to start when the Jail itself starts, so the Server will automatically run without me having to do anything. I feel like there has to be some way to do this, some small thing I must be missing, some dumb reason why this won't work.
If there's any help anyone can offer me, it would be very, very appreciated.