Unable to use restart-script-location

Discussion in 'Server & Community Management' started by vemacs, Mar 25, 2013.

  1. vemacs

    Artist

    I've been talking with other people in IRC, and they just seem to have given up on the restart script. I've tried to give it another go, so here it is (still not working).

    Spigot.jar location:

    Code (Text):
    /home/nullblock/660/spigot.jar
    Bukkit.yml's changed line:

    Code (Text):
    restart-script-location: /home/nullblock/660/start.sh
    start.sh (chmod +x'ed):

    Code (Text):
    #!/bin/sh
     
    service minecraft start
    (I'm using minecraft-init).

    The issue is when I run /restart ingame, it finds the script, but the server just shuts down, and isn't started back up. I've also tried using "service minecraft start" in the script to no avail. I would really like to get this working on my MCPC+ setup (built on top of spigot), but the whole thing seems bugged.
    Does anybody have any advice to offer? Has anybody gotten this to work on Linux?
     
  2. try adding "sleep 1" before starting the service, Ive done little tests and found that the script is ran while the server is still running.

    I have gotten the restart script to work perfectly. I run the server in a screen session always so when it calls the restart script it actually waits 1 second then stuffs the java run command into the screen and runs it. I had to make the script wait a little bit since if it didn't it would stuff the command and hit enter while the server is in between saving and exiting.
     
  3. vemacs

    Artist

    I've added sleep as well, to no avail (added a sleep 5). In addition, I happen to want the log rolling and backup support of my startup script.

    I gave up, so I wrote my own script (it only watches for crash-reports):

    http://github.com/vemacs/RestartOnCrash/
     
    #3 vemacs, Mar 25, 2013
    Last edited: Mar 26, 2013
  4. shit just got real, gl
     
  5. jeff142

    Benefactor

    gotta love the crash comment