mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
mc: use rcon-cli to stop the server, when it's available
This commit is contained in:
parent
90d721763d
commit
d368978949
@ -30,7 +30,7 @@ EXPOSE 25565 25575
|
||||
|
||||
ARG RESTIFY_VER=1.1.4
|
||||
ARG RCON_CLI_VER=1.4.0
|
||||
ARG MC_SERVER_RUNNER_VER=1.2.0
|
||||
ARG MC_SERVER_RUNNER_VER=1.3.0
|
||||
ARG TOF_BUILDTOOLS_VER=1.2.0
|
||||
ARG ARCH=amd64
|
||||
|
||||
|
@ -82,6 +82,8 @@ if [ -n "$JVM_DD_OPTS" ]; then
|
||||
done
|
||||
fi
|
||||
|
||||
mcServerRunnerArgs="--stop-duration 60s"
|
||||
|
||||
if [[ ${TYPE} == "FEED-THE-BEAST" ]]; then
|
||||
if [ ! -e ${FTB_DIR}/ops.json -a -e /data/ops.txt ]; then
|
||||
cp -f /data/ops.txt ${FTB_DIR}/
|
||||
@ -101,7 +103,7 @@ EOF
|
||||
|
||||
cd ${FTB_DIR}
|
||||
echo "Running FTB ${FTB_SERVER_START} in ${FTB_DIR} ..."
|
||||
exec mc-server-runner ${FTB_SERVER_START}
|
||||
exec mc-server-runner ${mcServerRunnerArgs} ${FTB_SERVER_START}
|
||||
else
|
||||
# If we have a bootstrap.txt file... feed that in to the server stdin
|
||||
if [ -f /data/bootstrap.txt ]; then
|
||||
@ -109,5 +111,5 @@ else
|
||||
fi
|
||||
|
||||
JVM_OPTS="-Xms${INIT_MEMORY} -Xmx${MAX_MEMORY} ${JVM_OPTS}"
|
||||
exec mc-server-runner ${bootstrapArgs} java $JVM_XX_OPTS $JVM_OPTS $expandedDOpts -jar $SERVER "$@" $EXTRA_ARGS
|
||||
exec mc-server-runner ${bootstrapArgs} ${mcServerRunnerArgs} java $JVM_XX_OPTS $JVM_OPTS $expandedDOpts -jar $SERVER "$@" $EXTRA_ARGS
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user