-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
*Feature Request* support with spigot restart command #144
Comments
@soulgriever could you document here what "several things" means? I would consider writing a .sh script that includes the service minecraft stop service minecraft start etc. or some more advanced version of this. |
I tried writing a sh script that passed the command for it to start the server (ex. /etc/init.d/minecraft start), wrote an sh script that passed the command for it to restart the server (ex. /etc/init.d/minecraft restart) I honestly dont rember what else I did its been a bit |
OK fair enough have you tried service minecraft restart I've not tried this at all myself I'm also curious as to what works and may not. |
Does this script work with spigot servers ? |
It will if you add it to the config just replace bukkit.jar with spigot.jar |
I believe the OP is looking for native Spigot integration so that when Spigot detects it has crashed, it can use this script to automatically restart it. I will be working on this. |
That would be lovely I would be very happy with this concept. Would you also be able to make an if-down-up kind of thing? That would be super phenomenal. |
It would be. I'm working on it here: https://github.com/alfonsojon/minecraft-init |
Let me know when its done. Might be adding minecraft-init back to my server. Simple but yet the best ive used yet. Also might want to state mcpc+ as well if its supported (spigot is built into mcpc+) |
if/when this functionality is incorporated how would it be executed? if the server crashes spigot detects it has crashed and attempts to run a script would I just make a shell script with "/etc/init.d/minecraft restart" but the problem is the execution spigot starts the new server before exiting the old one, so for this to work you would have to have some sort of sleep command |
Its already incorporated you can view it on @alfonsojon's github repo he linked. You don't have to wait for it to be accepted. |
@Chamunks It is not incorperated all he did was add an update function for spigot, this has nothing to do with the restart support he was talking about, and as he said above he "would be working on it" never said it was done |
@soulgriever If no one else does it I'll have someone do it by tomorrow because I'm tired of not having this feature myself. |
to make it work simply set your start.sh to the following #!/bin/bash that took way to long to figure out |
@soulgriever Not sure if this is exactly what you're looking for but with this PR #160 you can run a cronjob every X amount of time that will autoboot your server if its dead. So it may not be start.sh support but you might even be able to add a start.sh that supports this in some way. Just grab the init off of my repo. It also includes the spigot.jar support etc. |
Theres some bugs with my pull request don't use it just yet. |
@soulgriever @Chamunks My fork is now much more compatible with Bukkit and Spigot. I'm currently looking for Spigot documentation on this, as it doesn't seem especially clear as to how this would work. |
Spigot/mcpc+ has an option to run an automated script to restart the server on the event of a crash or if the "restart" command is given, I would like to know if there is any way to make it compatible with minecraft-init I have tried several things with no sucess
The text was updated successfully, but these errors were encountered: