1
0
Fork 0

Initial commit

This commit is contained in:
Vojtěch Mareš 2023-09-26 21:51:39 +00:00
commit 30f633c7ff
1281 changed files with 265821 additions and 0 deletions

27
.systemd/velocity.service Normal file
View file

@ -0,0 +1,27 @@
[Unit]
Description=Minecraft Velocity Proxy
After=network.target
[Service]
WorkingDirectory=/opt/minecraft/proxy
User=minecraft
Group=minecraft
Restart=always
StartLimitIntervalSec=10
EnvironmentFile=/opt/minecraft/proxy/.env
ExecStart=/usr/bin/screen -DmS mc-proxy /usr/bin/java -Xms${MEMORY} -Xmx${MEMORY} -XX:+UseG1GC -XX:G1HeapRegionSize=4M -XX:+UnlockExperimentalVMOptions -XX:+ParallelRefProcEnabled -XX:+AlwaysPreTouch -XX:MaxInlineLevel=15 -jar velocity.jar
ExecStop=/usr/bin/screen -p 0 -S mc-proxy -X eval 'stuff "broadcast PROXY SHUTTING DOWN IN 15 SECONDS..."\015'
ExecStop=/bin/sleep 5
ExecStop=/usr/bin/screen -p 0 -S mc-proxy -X eval 'stuff "broadcast PROXY SHUTTING DOWN IN 10 SECONDS..."\015'
ExecStop=/bin/sleep 5
ExecStop=/usr/bin/screen -p 0 -S mc-proxy -X eval 'stuff "broadcast PROXY SHUTTING DOWN IN 5 SECONDS..."\015'
ExecStop=/bin/sleep 5
ExecStop=/usr/bin/screen -p 0 -S mc-proxy -X eval 'stuff "shutdown"\015'
[Install]
WantedBy=multi-user.target