mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-08-31 19:27:15 +00:00
Fix mc-send-to-console running with uid=0(root) (#3106)
This commit is contained in:
@@ -17,7 +17,7 @@ if [ ! -p "${CONSOLE_IN_NAMED_PIPE}" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$(id -u)" = 0 ]; then
|
if [ "$(id -u)" = 0 -a $UID != 0 ]; then
|
||||||
if [[ $(getDistro) == alpine ]]; then
|
if [[ $(getDistro) == alpine ]]; then
|
||||||
exec su-exec minecraft bash -c "echo '$*' > '${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}'"
|
exec su-exec minecraft bash -c "echo '$*' > '${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}'"
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user