mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
3f3a2d8433
Regarding the minecraft-server image The start script currently does not pass command line arguments to the next script. This makes it so server admins can't easily update their server to 1.13.2 by passing --forceUpgrade as an extra parameter after specifying the docker image. With this change it works as intended. Proof that the arguments did not get added before and do now: * Add this line to the start-minecraftFinalSetup script: `echo "Running with: mc-server-runner ${bootstrapArgs} java $JVM_XX_OPTS $JVM_OPTS -jar $SERVER ""$@"" $EXTRA_ARGS"` * Build the image * Run the image with extra arguments `--test` * See this printed: `Running with: mc-server-runner -jar minecraft_server.1.13.2.jar` * Update to this PR * Build the image * See this printed: `Running with: mc-server-runner -jar minecraft_server.1.13.2.jar --test`
23 lines
451 B
Bash
Executable File
23 lines
451 B
Bash
Executable File
#!/bin/bash
|
|
|
|
umask 0002
|
|
chmod g+w /data
|
|
|
|
if [ $(id -u) = 0 ]; then
|
|
if [[ -v UID && $UID != $(id -u) ]]; then
|
|
usermod -u $UID minecraft
|
|
fi
|
|
if [[ -v GID ]]; then
|
|
groupmod -o -g $GID minecraft
|
|
fi
|
|
|
|
if [[ $(stat -c "%u" /data) != $UID ]]; then
|
|
echo "Changing ownership of /data to $UID ..."
|
|
chown -R minecraft:minecraft /data
|
|
fi
|
|
|
|
exec su-exec minecraft:minecraft /start-configuration $@
|
|
else
|
|
exec /start-configuration $@
|
|
fi
|