NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

Not The Answer You're Looking For?

How do I automatically restart a Minecraft Spigot server in the event of a crash or /stop when using screen?



Screen allows me to run my minecraft server on Linux. I also use it to perform other tasks from the same console. When using screen, all restart scripts described on the Internet and the Spigot wiki no longer worked. The "/restart" command never worked either. So how do I restart the server automatically after a short time if it crashes or I shut it down with "/stop" ingame?



Create a script to check if spigot server is running, if not, start the server. Put this script on cron to run every X minutes - Joao Vitorino Jun 2, 2020 at 1:28



Trending sort



Trending sort is based off of the default sorting method - by highest score - but it boosts votes that have happened recently, helping to surface more up-to-date answers.



It falls back to sorting by highest score if no posts are trending.



Tutorial



A bash script was written by a friend to automatically restart a minecraft server (spigot) in the event of a crash. Mc list It can also be used with the command "/stop" when you use screen. There are several seconds to cancel the restart with Enter. In addition, the exit codes of the previous session are written to a file, which can be used to understand when and why a server has crashed or restarted.



You need two files:



1. "start.sh"



1. "startserver.sh"



You can change the start parameters by changing the variables:



JAR = server filename



MAXRAM = maximum RAM



MINRAM = minimum RAM



TIME = time in seconds until server restarts automatically



Execute the following in the directory:



Run your start up script:



To leave the minecraft screen press Ctrl + A + D



To reconnect to minecraft screen use screen -r



Did you discover any mistakes or do you disagree? Help me do it better.



I have a problem with this script since I changed os from Linux Centos 8 to Ubuntu 18.



When I was using this script to restart my Minecraft server in Linux Centos 8 I had no problem; since I changed OS to Ubuntu, I can't stop the auto restart script.



I just translated in Italian a few text rows.



This is what I see in the screen during the auto restart:



This does not appear to be a answer to OP. consider earning enough creds and add your comments to the OP instead - allenski Feb 18, 2021 at 2:59



Also, please do not post screenshots of text but the text itself. - Simon Doppler Feb 18, 2021 at 7:39



I couldn't find this log in the server logs and the pnly way to have some "proofs" of what's happening was this way. I'm new in this website so i'm not familiar with how to answer/reply to a post. I just needed some help here for this script - Anurag Borghetti Feb 18, 2021 at 19:23



I don't know why you have this error messages (./vanilla.sh not fount) but for your problem: You can still exit with Ctrl+C instead of "enter". Does it help? - Paul Becker Feb 21, 2021 at 15:20



@PaulBecker I can exit from the screen but the server runs in background and I can't stop it anymore. The only way is rebooting the machine - Anurag Borghetti Mar 17, 2021 at 11:36



Thanks for contributing an answer to Stack Overflow!



Not the answer you're looking for? Browse other questions tagged bash server automation minecraft restart or ask your own question.


Here's my website: https://mclijst.nl/
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.