From 876d908f6b55e11abb1bfac59b38a43963bd4667 Mon Sep 17 00:00:00 2001 From: Botond Hende Date: Tue, 23 Apr 2024 06:39:22 +0200 Subject: added systemd service --- minecraft.service | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 minecraft.service (limited to 'minecraft.service') diff --git a/minecraft.service b/minecraft.service new file mode 100644 index 0000000..b8a5b4c --- /dev/null +++ b/minecraft.service @@ -0,0 +1,20 @@ +[Unit] +Description = PaperMC container +After = network.target +ConditionPathExists = /srv/minecraft + +[Service] +Type = simple +ExecStartPre = -/usr/bin/podman stop papermc + +ExecStart = /usr/bin/podman run \ + --rm \ + --name papermc \ + --net host \ + -v /srv/minecraft/world:/opt/minecraft/world \ + -p 23673:23673/tcp \ + papermc + + +[Install] +WantedBy = default.target -- cgit v1.2.3-70-g09d2