mc-velocity/data/mc-velocity.service
2024-07-26 12:57:06 +02:00

32 lines
588 B
Desktop File

[Unit]
Description=Proxy for Minecraft server
After=network.target
[Install]
WantedBy=multi-user.target
[Service]
ExecReload=/usr/bin/screen -S velocity -X stuff \"reload^M\"
ExecStart=/usr/bin/screen -DmS velocity ./start.sh
ExecStop=/usr/bin/screen -p 0 -S velocity -X eval 'stuff "end"\\015'
ExecStop=/bin/sh -c '/bin/sleep 10'
Restart=on-failure
RestartSec=60s
ProtectControlGroups=true
ProtectHome=true
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectSystem=full
PrivateDevices=true
PrivateUsers=true
User=velocity
Group=velocity
WorkingDirectory=/opt/velocity/