Meta icon indicating copy to clipboard operation
Meta copied to clipboard

Auto-restart on /stop.

Open simplylate opened this issue 3 years ago • 7 comments

Feature request

Checklist

  • [ ] I have read and agree to the README (found on https://github.com/Minehut/Meta)
  • [ ] This is not a bug report, support request or plugin request
  • [ ] I have searched the Issue Tracker to make sure this is not a duplicate issue
  • [ ] This issue does not contain any sensitive information

Platform Panel

Describe the feature Ability to auto-restart server on /stop like Pterodactyl.

How the feature is useful For minigame networks with sub-servers restarting automatically.


Use 👍 and 👎 reactions to indicate you agree or disagree with this suggestion! Feel free to discuss the idea in the comments.

simplylate avatar Apr 19 '22 16:04 simplylate

Technically this is possible by yourself, probably disabled by minehut, if not should be (@drtshock). Create a file called t.sh and put java -jar server.jar inside it. Save it & create it. Go to spigot.yml and change auto-restart-on-stop to true (I think its called that). Also change script-name or whatever to t.sh or the name of the file you created. I have no idea if this will work or not, but its there.

expxx avatar Apr 19 '22 16:04 expxx

Technically this is possible by yourself, probably disabled by minehut, if not should be (@drtshock). Create a file called t.sh and put java -jar server.jar inside it. Save it & create it. Go to spigot.yml and change auto-restart-on-stop to true (I think its called that). Also change script-name or whatever to t.sh or the name of the file you created. I have no idea if this will work or not, but its there.

It'll break the container's functionality if you try to do something like this. We could probably add something like this through the panel. I like the idea.

CoreyShupe avatar Apr 19 '22 16:04 CoreyShupe

Yeah, I have a UHC Meetup server and well I have to be on for them to be able to play (since the server reboots at the end of the game to clear world) This would definitely help out :D

simplylate avatar Apr 19 '22 17:04 simplylate

Yeah, I have a UHC Meetup server and well I have to be on for them to be able to play (since the server reboots at the end of the game to clear world) This would definitely help out :D

As a temporary solution you can probably have your server hibernate itself to reset if you have a stateless server, just load a bunch of stuff into RAM and crash your server.

I know it's not the best option, but it is an option. (people can then start it from the lobby)

CoreyShupe avatar Apr 19 '22 17:04 CoreyShupe

You can use:

echo {1..1000000000}

as your "restart-script" and it will force-hibernate your server (by crashing it), unsure how well that works for your situation.

CoreyShupe avatar Apr 19 '22 17:04 CoreyShupe

Yeah, I have a UHC Meetup server and well I have to be on for them to be able to play (since the server reboots at the end of the game to clear world) This would definitely help out :D

As a temporary solution you can probably have your server hibernate itself to reset if you have a stateless server, just load a bunch of stuff into RAM and crash your server.

I know it's not the best option, but it is an option. (people can then start it from the lobby)

Yeah no it's apart of a network sadly so this probably wouldn't work.

simplylate avatar Apr 20 '22 09:04 simplylate

Yeah, I have a UHC Meetup server and well I have to be on for them to be able to play (since the server reboots at the end of the game to clear world) This would definitely help out :D

As a temporary solution you can probably have your server hibernate itself to reset if you have a stateless server, just load a bunch of stuff into RAM and crash your server. I know it's not the best option, but it is an option. (people can then start it from the lobby)

Yeah no it's apart of a network sadly so this probably wouldn't work.

Actually it would work better since minehut will repair the server and boot it back up. (If you only crash the sub servers)

minehut used a keepalive protocol for networks so if one pod goes down it reboots it, if the main proxy pod goes down it kills the entire process, though it should probably just recreate the pod, but that’s an issue for another topic

CoreyShupe avatar Apr 20 '22 09:04 CoreyShupe