Add systemd/minecraft.service
This commit is contained in:
parent
c84da8f48c
commit
4583828c90
|
@ -0,0 +1,25 @@
|
|||
[Unit]
|
||||
Description=Minecraft Server
|
||||
Documentation=
|
||||
Wants-network.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=minecraft
|
||||
Group=minecraft
|
||||
Nice=5
|
||||
KillMode=none
|
||||
Success ExitStatus=0 1
|
||||
ProtectHome=true
|
||||
ProtectSystem=full
|
||||
PrivateDevices=true
|
||||
NoNewPrivileges=true
|
||||
PrivateTmp=true
|
||||
InaccessibleDirectories=/root /sys/srv -/opt/media -/lost+found
|
||||
ReadWriteDirectories=/mt/sdb/mc
|
||||
Working Directory=/mt/sdb/mc
|
||||
ExecStart=java -Xmx7000M -Xms7000M -jar server.jar nogui
|
||||
ExecStop=/mt/sdb/mc/mcrcon/mcrcon - H localhost -P 25575 -p TOKEN TOKEN stop
|
||||
|
||||
[Install]
|
||||
WantedBy-multi-user.target
|
Loading…
Reference in New Issue