I have a Debian 10 server with a Minecraft server on it. It also works. My problem is that when I enter the restart command in Minecraft, the server just stops. How is it possible for him to start again? And is it possible to create an autorestart script, so that the server will restart after a certain time if there are fewer than a certain number of players on it? Then another question, can the server somehow start or stop when the server restarts?
So far I only have one start.sh, which contains it:
screen -S mc java -Xmx8192M -Xms4096M -jar spigot-1.15.2.jar nogui
In your case of the restart function you have to store a start script in the spigot.yml so that it can also execute it.
restart script
Default: ./start.sh
Type: String (File path)
Description: The location for your server's startup script. This path will be used for the / restart command and for the restart-on-crash option.
A start.sh file is required for this. Or you can create a .sh file and do it using a while do loop.
Sorry I have no plan what you mean.
You have to create a startscript on your Linux Debian server and then simply save it with the name in spigot.yml. It must be in the same folder as the Spigot server.