I am close to giving up on screen and look for alternatives. I have two Minecraft servers running on my server. A DireWolf20 and a EpicCraft. Sometimes I need to reboot the server, and every time I need to manually login via SSH and start screen 2 times, navigate to the folder with the launch file for the servers, launch, and detach the session. I was trying to make a script that automated that process, leaving me two named sessions that I could reconnect to later and manage of needed.
BUT I have NOT succeeded in making that script work. Sometimes I get two named screen windows where noting have happens, and sometimes nothing happens at all.
I am wildly frustrated and have no clue on what I am doing wrong.
My servers start with a ServerStart.sh file that contains:
java -Xms1024m -Xmx2048m -jar FTBServer-1.6.4-965.jar nogui
pause
That is the Direwolf20 server where the other server is the same.
I have tried 100 different things to get the script working, that is when I read that it’s one thing to make a scrip that works when I start it with the ./ command but when it’s going into the rc.local file I need to add: su - [username] -c
The ServerStart do NOT NEED ROOT!
In fact, I do not want it to run with root privileges.