mcpelauncher-linux icon indicating copy to clipboard operation
mcpelauncher-linux copied to clipboard

[Server] Add /stop command

Open kherock opened this issue 7 years ago • 5 comments

This would be neat since some web-based server panels expect to be able to shut down servers by passing in a text command. I could probably patch in a workaround myself to send an interrupt signal, but ideally we could have behavior that closely matches a Java edition server anyway.

This is awesome work by the way, keep doing what you've been doing!

kherock avatar Feb 11 '18 23:02 kherock

Hello, this is not within the scope of the launcher app itself. I plan to do a serverutils mod in the future that adds a few command (/stop, whitelist, bans) in the future but that's not something I want to do short term.

What you could do is to 'patch' the command in to the current codebase, if all you want is to having it working in console and not in-game.

MCMrARM avatar Feb 12 '18 13:02 MCMrARM

I think it can be a mod api.

codehz avatar Feb 12 '18 14:02 codehz

Oh, I think /stop command can be implemented by sending a signal to self pid..

codehz avatar Feb 13 '18 13:02 codehz

does sigterm stop the server gracefully?

nicman23 avatar Apr 20 '18 08:04 nicman23

@nicman23 yes, you can send SIGINT(Ctrl+C) and it will be stopped gracefully

codehz avatar Apr 20 '18 09:04 codehz