29 lines
614 B
Desktop File
29 lines
614 B
Desktop File
[Unit]
|
|
Description=Minecraft Vanilla Server
|
|
Wants=network.target
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=minecraft
|
|
Group=minecraft
|
|
Nice=5
|
|
KillMode=none
|
|
ProtectHome=true
|
|
ProtectSystem=full
|
|
ProtectControlGroups=true
|
|
ProtectKernelModules=true
|
|
ProtectKernelTunables=true
|
|
PrivateDevices=true
|
|
NoNewPrivileges=true
|
|
PrivateTmp=true
|
|
ReadWriteDirectories=/srv/minecraft/vanilla/server
|
|
WorkingDirectory=/srv/minecraft/vanilla/server
|
|
ExecStart=/usr/bin/java -Xmx2G -Xms2G -jar vanilla.jar --noconsole
|
|
ExecStop=/usr/local/bin/wardenctl directstop
|
|
RestartSec=5s
|
|
Restart=on-failure
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|