mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-24 01:56:24 +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
|
||||
fi
|
||||
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
if [ "$(id -u)" = 0 -a $UID != 0 ]; then
|
||||
if [[ $(getDistro) == alpine ]]; then
|
||||
exec su-exec minecraft bash -c "echo '$*' > '${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}'"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user