Improving organization in the event that I add more scripts to this repo
This commit is contained in:
25
minecraft/minecraft.service
Normal file
25
minecraft/minecraft.service
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Minecraft Server
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
|
||||||
|
Type=forking
|
||||||
|
|
||||||
|
User=minecraft
|
||||||
|
Group=minecraft
|
||||||
|
WorkingDirectory=/opt/minecraft
|
||||||
|
|
||||||
|
ExecStartPre=/opt/minecraft/scripts/rdify --init /opt/minecraft/world
|
||||||
|
ExecStart=/opt/minecraft/scripts/minecraft/mineserve start
|
||||||
|
ExecStartPost=screen -S mine_world_sync -dm /opt/minecraft/scripts/rdify --loop_sync 15 /opt/minecraft/world
|
||||||
|
|
||||||
|
ExecStop=screen -S mine_world_sync -X stuff ""
|
||||||
|
ExecStop=/opt/minecraft/scripts/minecraft/mineserve stop
|
||||||
|
ExecStopPost=/opt/minecraft/scripts/rdify --sync /opt/minecraft/world
|
||||||
|
ExecStopPost=/opt/minecraft/scripts/rdify --cleanup /opt/minecraft/world
|
||||||
|
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=30
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Reference in New Issue
Block a user