I am trying to make a startup script for my Minecraft severs but I can't figure out how to: If the session "Server1" exists, run a command in it, if it doesn't, create the session and then run the command.
I have read something about a
-dRR switch but haven't been able to use it.
The script is
java -Xmx 128M spigot.jar -o true BTW.
This is te command I've been using (can only run it once otherwise it will create news seesions)
screen -dmS Server3 bash -c '/home/server/Minecraft/BungeeCord/Server3/start.sh; exec bash' The start.sh file contains the above code.
Of course I tried to change the switch from
-dRR, but that didn't work.