summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBotond Hende <nettingman@gmail.com>2024-04-23 06:39:22 +0200
committerBotond Hende <nettingman@gmail.com>2024-04-23 06:39:22 +0200
commit876d908f6b55e11abb1bfac59b38a43963bd4667 (patch)
tree6b5c841fe902a2e3c9a935b446ccf656b27d70db
parentf4338f49f156c49fc80a86b46de306de9f528fd5 (diff)
added systemd serviceHEADmaster
-rw-r--r--minecraft.service20
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