diff options
author | Botond Hende <nettingman@gmail.com> | 2024-04-23 06:39:22 +0200 |
---|---|---|
committer | Botond Hende <nettingman@gmail.com> | 2024-04-23 06:39:22 +0200 |
commit | 876d908f6b55e11abb1bfac59b38a43963bd4667 (patch) | |
tree | 6b5c841fe902a2e3c9a935b446ccf656b27d70db | |
parent | f4338f49f156c49fc80a86b46de306de9f528fd5 (diff) |
-rw-r--r-- | minecraft.service | 20 |
1 files changed, 20 insertions, 0 deletions
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 |