[Help] Setting up Mark2 to cleanly restart on /restart command.

Discussion in 'Systems Administration' started by Surfdudeboy, May 28, 2015.

  1. Hello! I have a machine running Ubuntu server along with a spigot server with the mark2 server wrapper. Whenever I issue the /restart command from the console or in-game the spigot server will restart normally, but mark2 will think the server is simply shutting down. This leaves the server's java process running in the background, with me unable to attach to it via "mark2 attach". (mark2 doesn't know the server is running because the server was not started with mark2)

    I have been trying to create a restart.sh script and have spigot.yml point to it. ( restart-script: ./restart.sh) My thinking is that the server will do the following on the /restart command: Stop server -> which causes mark2 do shut down -> spigot runs restart.sh -> which runs "mark2 start" -> which starts the server in the proper way, through mark2.

    The script works when ran from shell, but it doesn't seem to get executed by spigot when the server restarts. I gave restart.sh full perms "777". Any ideas?