diff options
| author | Luke Hoersten <[email protected]> | 2020-05-12 21:24:25 -0500 |
|---|---|---|
| committer | Luke Hoersten <[email protected]> | 2020-05-12 21:24:25 -0500 |
| commit | 34567048dcba29e94514987636d38ae93d435686 (patch) | |
| tree | bc9a64a023736170824df21be0efbffd9810193a /minecraft/templates/minecraft.service.j2 | |
| parent | f65972e9405538d71a90e1f8bf2493547d4020a7 (diff) | |
Added minecraft server role.
Diffstat (limited to 'minecraft/templates/minecraft.service.j2')
| -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..d310634 --- /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 -Xms1536M -Xmx1536M -jar server.jar nogui + +PrivateTmp=true +ProtectSystem=full +NoNewPrivileges=true +PrivateDevices=true + +[Install] +WantedBy=multi-user.target |
