Initial commit
This commit is contained in:
commit
30f633c7ff
1281 changed files with 265821 additions and 0 deletions
39
.systemd/mc@.service
Normal file
39
.systemd/mc@.service
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
[Unit]
|
||||
Description=Minecraft Server: %i
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
SuccessExitStatus=0 1
|
||||
|
||||
ProtectHome=true
|
||||
ProtectSystem=full
|
||||
PrivateDevices=true
|
||||
NoNewPrivileges=true
|
||||
PrivateTmp=true
|
||||
InaccessibleDirectories=/root /sys /srv /media -/lost+found
|
||||
ReadWriteDirectories=/opt/minecraft/%i
|
||||
WorkingDirectory=/opt/minecraft/%i
|
||||
|
||||
User=minecraft
|
||||
Group=minecraft
|
||||
|
||||
Restart=always
|
||||
StartLimitIntervalSec=10
|
||||
StartLimitBurst=1
|
||||
|
||||
EnvironmentFile=/opt/minecraft/servers/%i/.env
|
||||
|
||||
ExecStart=/usr/bin/screen -DmS mc-%i /usr/bin/java -Xmx${MEMORY} -Xms${MEMORY} -jar server.jar nogui
|
||||
|
||||
ExecStop=/usr/bin/screen -p 0 -S mc-%i -X eval 'stuff "say SERVER SHUTTING DOWN IN 15 SECONDS..."\015'
|
||||
ExecStop=/bin/sleep 5
|
||||
ExecStop=/usr/bin/screen -p 0 -S mc-%i -X eval 'stuff "say SERVER SHUTTING DOWN IN 10 SECONDS..."\015'
|
||||
ExecStop=/bin/sleep 5
|
||||
ExecStop=/usr/bin/screen -p 0 -S mc-%i -X eval 'stuff "say SERVER SHUTTING DOWN IN 5 SECONDS..."\015'
|
||||
ExecStop=/bin/sleep 5
|
||||
ExecStop=/usr/bin/screen -p 0 -S mc-%i -X eval 'stuff "say SERVER IS SHUTTING DOWN NOW!!!"\015'
|
||||
ExecStop=/usr/bin/screen -p 0 -S mc-%i -X eval 'stuff "save-all"\015'
|
||||
ExecStop=/usr/bin/screen -p 0 -S mc-%i -X eval 'stuff "stop"\015'
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
27
.systemd/velocity.service
Normal file
27
.systemd/velocity.service
Normal 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
|
||||
Reference in a new issue