Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Auto-restart on /stop. #965

Open
4 tasks
simplylate opened this issue Apr 19, 2022 · 7 comments
Open
4 tasks

Auto-restart on /stop. #965

simplylate opened this issue Apr 19, 2022 · 7 comments
Labels
feature request New feature or idea suggestion

Comments

@simplylate
Copy link

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 simplylate added the feature request New feature or idea suggestion label Apr 19, 2022
@expxx
Copy link
Contributor

expxx commented Apr 19, 2022

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.

@CoreyShupe
Copy link

CoreyShupe commented Apr 19, 2022

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.

@simplylate
Copy link
Author

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

@CoreyShupe
Copy link

CoreyShupe commented Apr 19, 2022

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
Copy link

CoreyShupe commented Apr 19, 2022

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.

@simplylate
Copy link
Author

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.

@CoreyShupe
Copy link

CoreyShupe commented Apr 20, 2022

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature request New feature or idea suggestion
Projects
None yet
Development

No branches or pull requests

3 participants