Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Does anyone know how to make a restart wrapper for the start script?

Comments in 'Plugin Development' started by args, Sep 11, 2014.

Thread Status:
Not open for further replies.
  1. args
    Offline

    args New Member

    Joined:
    Jun 14, 2014
    Posts:
    47
    Minecraft User:
    args
    I'm trying to get my server to restart when it crashes or stops for whatever reason, Shogi said i could use a wrapper or the correct flags, and after searching around I don't know how to implement that.
    Can anyone send me in the right direction to learn this?


    EDIT:
    Nevermind, Buried in the forums i found this thread that contains the windows auto restart script :)

    Maybe it should be in the resource section as its useful to many people:
    http://forums.pocketmine.net/threads/how-to-make-auto-restart.4731/
    Last edited: Sep 11, 2014
  2. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,706
    Plugins:
    22
    Minecraft User:
    Falkirknh
    Locked because solved :)
    I wrote a wrapper in PHP you can check the code out at https://github.com/Falkirks/ServerSorter/blob/master/scripts/run.php, the issue is STDIN can't be set to non-blocking on most systems and for this reason no output appears from the process unless input is sent. I suppose I could use a threaded approach and pass the input pipe to one and the output to the other.
Thread Status:
Not open for further replies.

Share This Page

Advertisement