minecraft/server/templates/[email protected]
changeset 164 ae19501f5251
parent 156 ebd8a21a0e62
child 177 11f52d70bca4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/minecraft/server/templates/[email protected]	Sun Jul 18 20:17:16 2021 -0500
@@ -0,0 +1,20 @@
+[Unit]
+Description=Minecraft Server %I
+Documentation=https://minecraft.gamepedia.com/Tutorials/Setting_up_a_server
+After=network.target
+
+[Service]
+User={{minecraft_user}}
+Group={{minecraft_user}}
+WorkingDirectory={{minecraft_parent_dir}}/minecraft/%i
+Restart=on-failure
+RestartSec=20 5
+ExecStart=/usr/bin/java -Xms{{minecraft_mem}} -Xmx{{minecraft_mem}} -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar server.jar nogui
+
+PrivateTmp=true
+ProtectSystem=full
+NoNewPrivileges=true
+PrivateDevices=true
+
+[Install]
+WantedBy=multi-user.target