fix rcon and intruduce systemd integration

This commit is contained in:
anonoe 2025-12-16 00:36:16 +01:00
parent a0d0c47b53
commit 0289aab9b0
4 changed files with 44 additions and 6 deletions

25
server/MMS.container Normal file
View file

@ -0,0 +1,25 @@
[Unit]
Description=Modded Minecraft Server via Podman managed by Systemd
Documentation=https://git.nanody.de/anonoe/MMS
[Container]
Image=git.nanody.de/anonoe/jre-alpine:latest
AutoUpdate=registry
PublishPort=25565:25565/tcp
PublishPort=24454:24454/udp
UserNS=keep-id
Mount=type=bind,src=/PATH/TO/server,dst=/mnt/server
Mount=type=bind,src=/PATH/TO/rcon,dst=/mnt/rcon
WorkingDir=/mnt/server
PodmanArgs=--tty --interactive
Exec=java -Xmx4G -Xms1G -jar minecraft_server.jar --nogui
[Service]
SuccessExitStatus=0 143
TimeoutStartSec=480
TimeoutStopSec=480
ExecStop=-podman exec systemd-MMS sh /mnt/rcon/stop.sh
[Install]
# Start by default on boot
WantedBy=default.target