Autopause functionality (#531)

This commit is contained in:
Michael Kirsch authored and GitHub committed 2020-05-20 08:17:58 -05:00
1 parent ede58d9159
commit 71a7afab17
13 files changed
+324 -10

No files matched your search

+9
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 $@