Spigot Automatic Restart Failure

Discussion in 'Spigot Discussion' started by YoFuzzy3, Feb 11, 2013.

  1. YoFuzzy3

    Supporter

    When my server crashed yesterday it failed to find the startup script to start it again, "run.sh" was in the bukkit.yml file. What's the correct usage?

    http://pastebin.com/MnHaAUBw
     
  2. Puremin0rez

    Moderator

    You should just need to set it to whatever your startup file is called

    In my case its "StartServer.bat"

    Spigot doesn't like rebooting your server upon crashes though, mine has never successfully done so :\
     
  3. YoFuzzy3

    Supporter

    Well it's called run.sh, that's what I entered, and it failed. :(
     
  4. Puremin0rez

    Moderator

    Does it work when you do /restart ?
     
  5. YoFuzzy3

    Supporter

    Don't even want to attempt that right now, I'll try it out when there's not many players on.
     
  6. This may help you. This is my start.sh file which i use for my server which auto restarts when i type /stop

    Personally i tend to avoid using restart on crash in bukkit.yml and use a plugin to do /stop every 24 hours.

    Code (Text):
    echo "--------------"
    echo "Launching"
    echo "Renegademiners"
    echo "Please Wait"
    echo "--------------"
    sleep 3
    #!/bin/sh
    BINDIR=$(dirname "$(readlink -fn "$0")")
    cd "$BINDIR"
    while : ; do
      echo "starting server now ,  Wait till done to shut down the server."
      sleep 2
    java -Xms16m -Xmx6144m -XX:ParallelGCThreads=4 -XX:SurvivorRatio=15 -XX:TargetSurvivorRatio=90 -XX:MaxGCPauseMillis=500 -XX:+UseAdaptiveGCBoundary -XX:PermSize=128m -XX:MaxPermSize=256m -jar spigot.jar --log-limit=50000 nogui
      echo "Restart after 5 seconds , or press Ctrl+c"
      sleep 1
      echo "Restart after 4 seconds , or press Ctrl+c"
      sleep 1
      echo "Restart after 3 seconds , or press Ctrl+c"
      sleep 1
      echo "Restart after 2 seconds , or press Ctrl+c"
      sleep 1
      echo "Restart after 1 seconds , or press Ctrl+c"
      sleep 1
    done
     
    • Useful Useful x 1
  7. YoFuzzy3

    Supporter

    jebuzjack
    Nice script but I tend to end up restarting my server pretty much every day for updates anyway. Let's just hope it doesn't crash again, this was the first time in 2 months.

    Edit: Going to use it for Hunger Games. :D
     
    #7 YoFuzzy3, Feb 11, 2013
    Last edited: Feb 15, 2013