Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/configuration/misc-options.md
Comment thread
itzg marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ If this behavior interferes with the log content, then disable TTY or remove the

To allow time for players to finish what they're doing during a graceful server shutdown, set `STOP_SERVER_ANNOUNCE_DELAY` to a number of seconds to delay after an announcement is posted by the server.

To set a custom command to run at the start of this delay period, set `STOP_SERVER_DELAY_COMMAND` to the full command. This will run in place of the announcement.

!!! warning "Increase stop grace period"

The Docker stop grace period must be increased to a value longer than the announce delay. The value to use that is longer than announce delay will vary based upon the amount of time it takes for final world data saving. If the container exits with exit code 137, then that indicates a longer grace period is needed.
Expand Down Expand Up @@ -242,4 +244,4 @@ To also include the timestamp with each log, set `LOG_TIMESTAMP` to "true". The

```
[init] 2022-02-05 16:58:33+00:00 Starting the Minecraft server...
```
```
8 changes: 7 additions & 1 deletion docs/variables.md
Comment thread
itzg marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,12 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
<td><code></code></td>
<td>⬜️</td>
</tr>
<tr>
<td><code>STOP_SERVER_DELAY_COMMAND</code></td>
<td>To set a custom command to run at the start of this delay period, set <code>STOP_SERVER_DELAY_COMMAND</code> to the full command. This will run in place of the announcement.</td>
<td><code></code></td>
<td>⬜️</td>
</tr>
<tr>
<td><code>PROXY</code></td>
<td>You may configure the use of an HTTP/HTTPS proxy by passing the proxy's URL</td>
Expand Down Expand Up @@ -670,4 +676,4 @@ This image maps known server properties as described in [this section](configura
<td></td>
<td><code></code></td>
<td>⬜️</td>
</tr> -->
</tr> -->
3 changes: 3 additions & 0 deletions scripts/start-finalExec
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,9 @@ fi
if [[ ${STOP_SERVER_ANNOUNCE_DELAY} ]]; then
mcServerRunnerArgs+=(--stop-server-announce-delay "${STOP_SERVER_ANNOUNCE_DELAY}s")
fi
if [[ ${STOP_SERVER_DELAY_COMMAND} ]]; then
mcServerRunnerArgs+=(--stop-server-delay-command "${STOP_SERVER_DELAY_COMMAND}s")
fi
if isTrue "${ENABLE_SSH}"; then
mcServerRunnerArgs+=(--remote-console)
fi
Expand Down