fix command in case adduser no exist
This commit is contained in:
parent
b753b8da92
commit
0ff01d014a
4
debian/usr/bin/minecraft-pi
vendored
4
debian/usr/bin/minecraft-pi
vendored
@ -17,6 +17,10 @@ VIRGL_PID="$!"
|
||||
# Ensure Groups Are Correct
|
||||
if [ -z "${MCPI_SUBSHELL}" ]; then
|
||||
if ! id -Gn "$(whoami)" | grep '\bdocker\b' > /dev/null; then
|
||||
if ! command -v adduser &> /dev/null
|
||||
then
|
||||
pkexec usermod -aG "$(whoami)" docker
|
||||
fi
|
||||
pkexec adduser "$(whoami)" docker
|
||||
fi
|
||||
exec sg docker "env MCPI_SUBSHELL=1 \"$(realpath -e "$0")\""
|
||||
|
Loading…
Reference in New Issue
Block a user