Add configurable restart delay

This commit is contained in:
Salt 2021-01-01 18:25:04 -06:00
parent fa9a2397a7
commit e94937cd44
3 changed files with 3 additions and 1 deletions

View File

@ -2,6 +2,7 @@
minecraft_name: default minecraft_name: default
minecraft_version: 1.16.3 minecraft_version: 1.16.3
minecraft_enabled: yes minecraft_enabled: yes
minecraft_restart_delay: 5
# minecraft_forge_version: You tell me # minecraft_forge_version: You tell me
# Packages # Packages

View File

@ -1,2 +1,3 @@
JRE_XMX={{ minecraft_jre_xmx }} JRE_XMX={{ minecraft_jre_xmx }}
JRE_XMS={{ minecraft_jre_xms }} JRE_XMS={{ minecraft_jre_xms }}
MC_RESTART_DELAY={{ minecraft_restart_delay }}

View File

@ -30,7 +30,7 @@ ExecReload=/usr/bin/screen -p 0 -S %i -X eval 'stuff "reload"\\015'
ExecStop=/usr/bin/screen -p 0 -S %i -X eval 'stuff "say Server is going down: Service was stopped"\\015' ExecStop=/usr/bin/screen -p 0 -S %i -X eval 'stuff "say Server is going down: Service was stopped"\\015'
ExecStop=/usr/bin/screen -p 0 -S %i -X eval 'stuff "save-all"\\015' ExecStop=/usr/bin/screen -p 0 -S %i -X eval 'stuff "save-all"\\015'
ExecStop=/usr/bin/screen -p 0 -S %i -X eval 'stuff "stop"\\015' ExecStop=/usr/bin/screen -p 0 -S %i -X eval 'stuff "stop"\\015'
ExecStop=/bin/sleep 5 ExecStop=/bin/sleep ${MC_RESTART_DELAY}
Restart=always Restart=always
# Restart after 24hrs # Restart after 24hrs