diff --git a/README.md b/README.md index 0d30aa04..3a9083f2 100644 --- a/README.md +++ b/README.md @@ -1104,6 +1104,10 @@ Some older versions (pre-1.14) of Spigot required `--noconsole` to be passed whe Some older servers get confused and think that the GUI interface is enabled. You can explicitly disable that by passing `-e GUI=FALSE`. +### Stop Duration + +When the container is signalled to stop, the Minecraft process wrapper will attempt to send a "stop" command via RCON or console and waits for the process to gracefully finish. By defaul it waits 60 seconds, but that duration can be configured by setting the environment variable `STOP_DURATION` to the number of seconds. + ## Running on RaspberryPi To run this image on a RaspberryPi 3 B+, 4, or newer, use the image tag diff --git a/start-minecraftFinalSetup b/start-minecraftFinalSetup index 21b933cf..c2377d3a 100644 --- a/start-minecraftFinalSetup +++ b/start-minecraftFinalSetup @@ -173,7 +173,7 @@ function copyFilesForCurseForge() { cp -f /data/eula.txt "${FTB_DIR}/" } -mcServerRunnerArgs="--stop-duration 60s" +mcServerRunnerArgs="--stop-duration ${STOP_DURATION:-60}s" if [[ ${TYPE} == "CURSE_INSTANCE" ]]; then if isTrue ${DEBUG_EXEC}; then set -x