Skip to content

Commit ca393c4

Browse files
authored
Directly attach stdin of server process by default (#2605)
1 parent 5729324 commit ca393c4

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
4444
--var version=${MC_MONITOR_VERSION} --var app=mc-monitor --file {{.app}} \
4545
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
4646

47-
ARG MC_SERVER_RUNNER_VERSION=1.10.0
47+
ARG MC_SERVER_RUNNER_VERSION=1.11.0
4848
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
4949
--var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \
5050
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz

bin/mc-send-to-console

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
. "/start-utils"
33
: "${CONSOLE_IN_NAMED_PIPE:=/tmp/minecraft-console-in}"
44

5+
if isFalse "${CREATE_CONSOLE_IN_PIPE:-false}"; then
6+
echo "ERROR: console pipe needs to be enabled by setting CREATE_CONSOLE_IN_PIPE to true"
7+
fi
8+
9+
510
if [ $# = 0 ]; then
611
echo "ERROR: pass console commands as arguments"
712
exit 1

scripts/start-finalExec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,10 @@ fi
231231

232232
mcServerRunnerArgs=(
233233
--stop-duration "${STOP_DURATION:-60}s"
234-
--named-pipe "${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}"
235234
)
235+
if isTrue "${CREATE_CONSOLE_IN_PIPE:-false}"; then
236+
mcServerRunnerArgs+=(--named-pipe "${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}")
237+
fi
236238
if [[ ${STOP_SERVER_ANNOUNCE_DELAY} ]]; then
237239
mcServerRunnerArgs+=(--stop-server-announce-delay "${STOP_SERVER_ANNOUNCE_DELAY}s")
238240
fi

0 commit comments

Comments
 (0)