Created
March 9, 2018 18:14
-
-
Save rayriffy/b3c9a4426ab52949ef7f8d989a59f8ec to your computer and use it in GitHub Desktop.
Automatic restart minecraft when server goes down
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
while true | |
do | |
echo "##########STARTING###########" | |
java -Xms100M -Xmx8G -jar spigot.jar | |
echo "" | |
echo "" | |
echo "Restarting in:" | |
for i in 5 4 3 2 1 | |
do | |
echo "$i..." | |
sleep 1 | |
done | |
echo "Restarting..." | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment