-
Notifications
You must be signed in to change notification settings - Fork 28
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
module: replace tmux with systemd socket #52
Conversation
As per my comment in the last PR, a prerequisite for this kind of change is that it must be configurable. It should be possible to select between tmux and socket, and tmux would remain the default for a deprecation period. |
Yep! Will do. Just re-created this PR to get discussion and feedback going |
I am not familiar with systemd sockets, but do they offer an interactive mode like Tmux? Although not a feature I depend on, it is a convenience I enjoy having. |
I think this is ok to put this here instead of a separate issue, could there be a way to configure the socket to be stored in the Minecraft server's directory? That would me a minor convince to me as I have to type shorter directory names. |
systemd sockets do not have an interactive function, which is a major reason why I am so adamant about there being a toggle for it. Sockets are by design put in the /run runtime directory, as that is the standard place to put sockets. (Additionally, it being in /run is generally shorter than the /srv equivalent: |
The reason I say I would like to be able to configure them to be there is that I'm so often cd'ed there. Although that rational makes sense. |
Hi, @Misterio77, are you still working on this? I very much like the changes and am interested in using them myself. If you no longer have the time for this, would you mind me picking it up to make the socket configurable? Thanks! |
Hey @frantisekhanzlikbl, Thanks for the interest, feel free to pick it up! While I think the socket being configurable is a useful addition, I think the main blocker for this is currently making this a toggle as per @Infinidoge's comment |
Ohh, sorry, I didn't express myself too well. 😄 |
Superseded by #67 |
Supersedes #41.
This PR replaces tmux with a systemd stdin socket. With it, you can easily run commands like so:
We now use this to run "stop" (or any custom command) on ExecStop, for a cleaner shutdown.
To complement extraReload, I've added more extra* options for different parts of the lifecycle: extra{Post,Pre}{Start,Stop} (preStop and postStart can run game commands, awesome!).
The tests are also expanded:
list
and check the output is good.Misterio7x
to verifyops.json
is both mutable and has the correct declaratively-set valueunknown-command
. As paper mutatespaper.yml
(to fill it up with missing entries) on startup, this verifies that values set through nix-minecraft are kept by it.