Restart-on-crash 'Script'

Discussion in 'Spigot Discussion' started by R3DY246, Mar 25, 2013.

  1. I have a crash script, and my server just crashed and i was waiting for it to start back up with my script i have on, and it didnt start back up...

    Can anyone tell me if this is right

    restart-on-crash: true
    restart-script-location: /home/32GBServer/start.sh

    Is there anything else i need to add in that ^^^^^ to make it work ?
     
  2. Does the server restart successfuly if you run "restart" while server is running?
     
  3. I havnt quite tested that, does that require restart.sh, or just the same at the restart on crash ?
     
  4. yes, it requires the restart script to be specified in the config. If the server cannot restart by doing "restart" in the console then there is no way for it to restart on a crash.

    If it does restart in the console, but not by a crash then somehow the script is being blocked, possably by the original server still running and the next instance wants to bind ports but cannot.

    I could be totally wrong though =p
     
    • Like Like x 1
  5. Can you send me your Cron, restart please
     
  6. I do not run my server using cron, i run everything off of a screen session.
     
  7. vemacs

    Artist

  8. I had issues getting the restart script to work with screen session, I figured out you have to have it startup with the screen detatched. Heres my script:

    http://pastebin.com/HAKmdVbL
     
  9. vemacs

    Artist

    I tried

    Code (Text):
    #!/bin/sh
    screen -dmS start service minecraft start
    But it still doesn't work at all. Can somebody else bug md_5 to not shutdown spigot when running /restart, but just call the script?
     
    • Agree Agree x 1
  10. When i run /restart or it crashes it says "java.io.IOException: Cannot run program "sh": java.io.IOException: error=12, Cannot allocate memory" so i have the same problem here!