This repository has been archived on 2024-07-17. You can view files and clone it, but cannot push or open issues or pull requests.
minecraft-systemd-services/minecraft-spigot.service

29 lines
612 B
SYSTEMD
Raw Permalink Normal View History

2020-02-07 03:35:06 +00:00
[Unit]
Description=Minecraft SpigotMC 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/spigot/server
WorkingDirectory=/srv/minecraft/spigot/server
ExecStart=/usr/bin/java -Xmx2G -Xms2G -jar spigot.jar --noconsole
ExecStop=/usr/local/bin/wardenctl directstop
RestartSec=5s
Restart=on-failure
[Install]
WantedBy=multi-user.target