Skip to content
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

nixos/minecraft-server: add fifo controll and stop warning #88432

Open
wants to merge 1 commit into
base: master
from

Conversation

@Kloenk
Copy link
Contributor

Kloenk commented May 20, 2020

Motivation for this change

Providing a way to control the Minecraft server without the use of rcon, or running the Minecraft server in a tmux session.

Also, be able to see when the server restarts when you are playing.

Things done

implement services.minecraft-server.fifo and services.minecraft-server.warn

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@nixos-discourse
Copy link

nixos-discourse commented May 20, 2020

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/minecraft-server-controll-socket/7286/5

@Kloenk Kloenk requested a review from Infinisil May 23, 2020
nixos/modules/services/games/minecraft-server.nix Outdated Show resolved Hide resolved
nixos/modules/services/games/minecraft-server.nix Outdated Show resolved Hide resolved
nixos/modules/services/games/minecraft-server.nix Outdated Show resolved Hide resolved
nixos/modules/services/games/minecraft-server.nix Outdated Show resolved Hide resolved
nixos/modules/services/games/minecraft-server.nix Outdated Show resolved Hide resolved
@Kloenk Kloenk force-pushed the Kloenk:feature/mc-fifo branch 2 times, most recently from 17bd691 to 1719c3d May 28, 2020
@Kloenk
Copy link
Contributor Author

Kloenk commented May 28, 2020

Thanks, @Infinisil. Applied all changes.

@Kloenk Kloenk requested a review from Infinisil May 28, 2020
@Kloenk Kloenk force-pushed the Kloenk:feature/mc-fifo branch from 1719c3d to bb6f12f May 29, 2020
@Kloenk
Copy link
Contributor Author

Kloenk commented May 29, 2020

Fixed, sorry missed it.

@Kloenk Kloenk requested a review from Infinisil May 29, 2020
Copy link
Member

Infinisil left a comment

Other than the minor bits in the review, my only other concern is:

$ systemctl stop minecraft-server
Warning: Stopping minecraft-server.service, but it can still be activated by:
  minecraft-server.socket

For what we use the socket for, I don't think it makes sense for it to be allowed to start the service. If there's no way to turn this off then I guess we'll just roll with it though.

@Kloenk Kloenk force-pushed the Kloenk:feature/mc-fifo branch from bb6f12f to 2678a78 Jun 1, 2020
@Kloenk Kloenk force-pushed the Kloenk:feature/mc-fifo branch from 2678a78 to 220c91c Jun 1, 2020
@Kloenk
Copy link
Contributor Author

Kloenk commented Jun 1, 2020

Other than the minor bits in the review, my only other concern is:

$ systemctl stop minecraft-server
Warning: Stopping minecraft-server.service, but it can still be activated by:
  minecraft-server.socket

For what we use the socket for, I don't think it makes sense for it to be allowed to start the service. If there's no way to turn this off then I guess we'll just roll with it though.

The only way I see is to run a PostStop script which calls systemd to stop minecraft-server.socket. Unsure if we want this

@Kloenk Kloenk requested a review from Infinisil Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.