mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-28 11:56:25 +00:00
Remove all use of sudoers file (#3477)
This commit is contained in:
@@ -17,8 +17,9 @@ if [ ! -p "${CONSOLE_IN_NAMED_PIPE}" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$(id -u)" = 0 -a $UID != 0 ]; then
|
||||
exec $(getSudoFromDistro) minecraft bash -c "echo '$*' > '${CONSOLE_IN_NAMED_PIPE}'"
|
||||
if [[ "$(id -u)" = 0 ]] && [[ $UID != 0 ]]; then
|
||||
error "Exec needs to be run with user ID $UID"
|
||||
exit 2
|
||||
else
|
||||
echo "$@" >"${CONSOLE_IN_NAMED_PIPE}"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user