aboutsummaryrefslogtreecommitdiff
path: root/miscellaneous/systemd.service
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2016-10-12 20:26:34 +0200
committerKarel Kočí <cynerd@email.cz>2016-10-12 20:26:34 +0200
commitfcbf1c073d90c09e27b2ba69ca62b89ad6e1b063 (patch)
tree2ef7576e9381cdc5f4d49a7136c5c68d6a35f4fd /miscellaneous/systemd.service
parent862434d885ba907688611aedf03d74d27669f1a8 (diff)
downloadmcserver-wrapper-fcbf1c073d90c09e27b2ba69ca62b89ad6e1b063.tar.gz
mcserver-wrapper-fcbf1c073d90c09e27b2ba69ca62b89ad6e1b063.tar.bz2
mcserver-wrapper-fcbf1c073d90c09e27b2ba69ca62b89ad6e1b063.zip
Add systemd service example
Diffstat (limited to 'miscellaneous/systemd.service')
-rw-r--r--miscellaneous/systemd.service19
1 files changed, 19 insertions, 0 deletions
diff --git a/miscellaneous/systemd.service b/miscellaneous/systemd.service
new file mode 100644
index 0000000..ba24ea1
--- /dev/null
+++ b/miscellaneous/systemd.service
@@ -0,0 +1,19 @@
+# Move this file to /etc/systemd/system and rename it to something like mc.service
+[Unit]
+Description=Minecraft server
+
+[Install]
+WantedBy=multi-user.target
+After=netwotk-online.target
+
+[Service]
+# Change this to your real user, under which Minecraft server will be executed or create minecraft user.
+User=minecraft
+# Update this path to directory where server will be hosted
+WorkingDirectory=~
+# Change any argument here and name of downloaded executable
+ExecStart=mcwrapper -spv java -Xmx1024M -Xms1024M -jar MinecraftServer.jar
+# If Minecraft server is most important thing on your server, make it less nice to other processes
+Nice=-5
+# When server falls, it is automatically restarted
+Restart=always