commit b2c525bf334c0254a8dab964c4f7c64f0d64a7a3 Author: Adam Date: Fri Jan 3 02:59:24 2020 +0000 Initial commit diff --git a/minecraft.service b/minecraft.service new file mode 100644 index 0000000..d80e36e --- /dev/null +++ b/minecraft.service @@ -0,0 +1,28 @@ +[Unit] +Description=Minecraft Server +Wants=network.target +After=network.target + +[Service] +Type=simple +User=minecraft +Group=minecraft +Nice=5 +KillMode=none +SuccessExitStatus=0 1 +ProtectHome=true +ProtectSystem=full +PrivateDevices=true +NoNewPrivileges=true +PrivateTmp=true +InaccessibleDirectories=/root /sys /mnt/data +ReadWriteDirectories=/srv/minecraft/spigot/server +WorkingDirectory=/srv/minecraft/spigot/server +ExecStart=/usr/bin/java -Xmx2G -Xms1G -jar spigot.jar --noconsole +ExecStop=/srv/minecraft/spigot/bin/warden-shutdown +KillMode=control-group +RestartSec=5s +Restart=on-failure + +[Install] +WantedBy=multi-user.target \ No newline at end of file