Let Minecraft Server start automatically after stop?

Ge
- in Servers
1

I run a Minecraft server, and I or We would like to bring a new game mode, namely Skywars, but the Skywars server stops after a round to reset, which is not so bad, but it should restart automatically, since no one of our team can be permanently in the console to restart it. We also tried a lot, for example modified the startup script:

while true

do

screen (etc.)

sleep 5

done

PS: We use Debian and a bungee cord server

However, this script only works if you are still attached in the screen. Are there any other solutions to this problem?

Co

Instead of starting the While loop on a screen you should have the While loop in a screen and instead of the screen just directly the Java / MC commands.

server.sh:

while true
do
java -jar server.jar nogui
sleep 5
done

and then screen -Sdm SCREENNAME./server.sh