Debian / Linux Script - Minecraft Server fully automatically restart?

Tr
- in Servers
4

I would like to restart my Minecraft Server Voll Automatically with a script, so if he z.b. Crashes that he automatically restarts without me 24/7 the console must be open. Unfortunately, I find no solutions on the Internet so I'll try it here.

Su

Assuming that you already have the script and you only have to "without me having to open the console 24/7" goes: https://www.gnu.org/software/screen/manual/screen.html

Ad

You really do not want to do that via script. Rather, you want to have that done by a 'supervisor'.

Which does not mean that it would not synonymous via script.

Le

Cron job (under the user account under which the server is running) every minute:

check if server is still running; if no, restart

(How to check from the shell, if the server is still running, should be in the document to the server)

Le

Perhaps additional query whether the server crashes several times in a row after a few minutes, and if so, start the server in the "verbose" mode, to be able to see the log afterwards for possible causes of crashes