minecraft/templates/minecraft.service.j2
changeset 19 31de177274a1
equal deleted inserted replaced
18:ea20908c3904 19:31de177274a1
       
     1 [Unit]
       
     2 Description=Minecraft Server
       
     3 Documentation=https://minecraft.gamepedia.com/Tutorials/Setting_up_a_server
       
     4 
       
     5 Wants=network.target
       
     6 After=network.target
       
     7 
       
     8 [Service]
       
     9 User={{minecraft_user}}
       
    10 Group={{minecraft_user}}
       
    11 WorkingDirectory={{minecraft_dir}}
       
    12 Restart=on-failure
       
    13 RestartSec=20 5
       
    14 ExecStart=/usr/bin/java -Xms1536M -Xmx1536M -jar server.jar nogui
       
    15 
       
    16 PrivateTmp=true
       
    17 ProtectSystem=full
       
    18 NoNewPrivileges=true
       
    19 PrivateDevices=true
       
    20 
       
    21 [Install]
       
    22 WantedBy=multi-user.target