diff options
| author | Luke Hoersten <[email protected]> | 2020-07-03 12:01:00 -0500 |
|---|---|---|
| committer | Luke Hoersten <[email protected]> | 2020-07-03 12:01:00 -0500 |
| commit | 578da7e200490a1c1a8f34bd2c8929c765ac58f4 (patch) | |
| tree | e4442829f5678900c8ff80ffb4e29c3a4283133f /minecraft/templates | |
| parent | 19a6e28470d0bc998b4e1c0cb61f72f532ae8365 (diff) | |
Renamed papermc role to minecraft.
Diffstat (limited to 'minecraft/templates')
| -rw-r--r-- | minecraft/templates/minecraft.service.j2 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/minecraft/templates/minecraft.service.j2 b/minecraft/templates/minecraft.service.j2 new file mode 100644 index 0000000..0f0e91a --- /dev/null +++ b/minecraft/templates/minecraft.service.j2 @@ -0,0 +1,22 @@ +[Unit] +Description=Minecraft Server +Documentation=https://minecraft.gamepedia.com/Tutorials/Setting_up_a_server + +Wants=network.target +After=network.target + +[Service] +User={{minecraft_user}} +Group={{minecraft_user}} +WorkingDirectory={{minecraft_dir}} +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 |
