Fix adduser Usage (Thanks @gamercat113)
This commit is contained in:
parent
b607356c86
commit
c756153cfb
5
debian/client/usr/bin/minecraft-pi
vendored
5
debian/client/usr/bin/minecraft-pi
vendored
@ -17,8 +17,13 @@ VIRGL_PID="$!"
|
|||||||
# Ensure Groups Are Correct
|
# Ensure Groups Are Correct
|
||||||
if [ -z "${MCPI_SUBSHELL}" ]; then
|
if [ -z "${MCPI_SUBSHELL}" ]; then
|
||||||
if ! id -Gn "$(whoami)" | grep '\bdocker\b' > /dev/null; then
|
if ! id -Gn "$(whoami)" | grep '\bdocker\b' > /dev/null; then
|
||||||
|
if ! command -v adduser &> /dev/null
|
||||||
|
then
|
||||||
|
pkexec usermod -aG "$(whoami)" docker
|
||||||
|
else
|
||||||
pkexec adduser "$(whoami)" docker
|
pkexec adduser "$(whoami)" docker
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
exec sg docker "env MCPI_SUBSHELL=1 \"$(realpath -e "$0")\""
|
exec sg docker "env MCPI_SUBSHELL=1 \"$(realpath -e "$0")\""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user