diff options
author | Ross Charles Campbell <rossbridger.cc@gmail.com> | 2020-10-26 11:51:15 +0800 |
---|---|---|
committer | Conrad Kostecki <conikost@gentoo.org> | 2020-11-03 09:20:56 +0100 |
commit | e3af652a6121b5d82043b51532a183a39e4782ce (patch) | |
tree | a1c161e8094e695b44cefae2f4eab670c799886e /games-server/minecraft-server/files/minecraft-server.service | |
parent | net-im/transwhat: drop old version (diff) | |
download | gentoo-e3af652a6121b5d82043b51532a183a39e4782ce.tar.gz gentoo-e3af652a6121b5d82043b51532a183a39e4782ce.tar.bz2 gentoo-e3af652a6121b5d82043b51532a183a39e4782ce.zip |
games-server/minecraft-server: Add systemd unit, add ~arm64 keyword
Tested fine on Pi4
Closes: https://github.com/gentoo/gentoo/pull/18038
Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Ross Charles Campbell <rossbridger.cc@gmail.com>
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'games-server/minecraft-server/files/minecraft-server.service')
-rw-r--r-- | games-server/minecraft-server/files/minecraft-server.service | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/games-server/minecraft-server/files/minecraft-server.service b/games-server/minecraft-server/files/minecraft-server.service new file mode 100644 index 000000000000..ad9167e5b1c9 --- /dev/null +++ b/games-server/minecraft-server/files/minecraft-server.service @@ -0,0 +1,16 @@ +[Unit] +Description=Minecraft Server (World: %I) +After=network.target + +[Service] +User=minecraft +Group=minecraft +WorkingDirectory=-/var/lib/minecraft-server/%I +PIDFile=/run/minecraft-server.%I.pid +ExecStartPre=!/bin/mkdir -p /var/lib/minecraft-server/%I +ExecStartPre=!/bin/chown -R minecraft:minecraft /var/lib/minecraft-server/%I +ExecStartPre=/bin/sh -c 'echo "eula=true" > /var/lib/minecraft-server/%I/eula.txt' +ExecStart=/bin/sh -c '/usr/bin/dtach -N $(mktemp -u) /usr/bin/minecraft-server' + +[Install] +WantedBy=multi-user.target |