Autopause functionality (#531)

This commit is contained in:
Michael Kirsch
2020-05-20 15:17:58 +02:00
committed by GitHub
parent ede58d9159
commit 71a7afab17
13 changed files with 324 additions and 10 deletions

View File

@@ -180,4 +180,13 @@ else
log "server.properties already created, skipping"
fi
if isTrue "${ENABLE_AUTOPAUSE}"; then
current_max_tick=$( grep 'max-tick-time' "$SERVER_PROPERTIES" | sed -r 's/( )+//g' | awk -F= '{print $2}' )
if (( $current_max_tick > 0 && $current_max_tick < 86400000 )); then
log "Warning: The server.properties for the server doesn't have the Server Watchdog (effectively) disabled."
log "Warning (cont): Autopause functionality resuming the process might trigger the Watchdog and restart the server completely."
log "Warning (cont): Set the max-tick-time property to a high value (or disable the Watchdog with value -1 for versions 1.8.1+)."
fi
fi
exec /start-finalSetup05EnvVariables $@