papermc/templates/papermc.service.j2
changeset 33 ad75fc2d2853
parent 19 31de177274a1
child 108 f00f45a9512d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/papermc/templates/papermc.service.j2	Sat May 30 20:57:42 2020 -0500
@@ -0,0 +1,22 @@
+[Unit]
+Description=PaperMC Server
+Documentation=https://paper.readthedocs.io/en/latest/server/getting-started.html
+
+Wants=network.target
+After=network.target
+
+[Service]
+User={{papermc_user}}
+Group={{papermc_user}}
+WorkingDirectory={{papermc_dir}}
+Restart=on-failure
+RestartSec=20 5
+ExecStart=/usr/bin/java -Xms{{papermc_mem}} -Xmx{{papermc_mem}} -jar server.jar
+
+PrivateTmp=true
+ProtectSystem=full
+NoNewPrivileges=true
+PrivateDevices=true
+
+[Install]
+WantedBy=multi-user.target