Auto restart script doesn't work!

Discussion in 'Spigot Help' started by Scrapnix, Apr 21, 2017.

  1. Hey there,
    I am creating my own server at the moment and I have a lot of problems.
    The weirdest thing is that my auto restart script doesn't work correctly.
    Everytime I stop the server it restarts like I planned, but if I closed my screen after that (strg + a + d),
    It comes into an endless loop. The server starts and after 5 seconds the server stops and restarts.
    My script is this one (I managed the whole thing above the start.sh):
    Code (Text):
    #!/bin/sh
    while true
    do
    screen -S Jump1 java -jar -Xms500M -Xmx500M -jar spigot-1.8.8.jar
    echo The server restarts in 5 seconds
    sleep 5
    done
     
    I hope someone can help me ;)
     
  2. A really basic version for this would be:
    Code (Text):
    #!/bin/sh
    while true
    do
    java -jar -Xms500M -Xmx500M -jar spigot-1.8.8.jar
    sleep 5
    done