diff options
-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 |