Compare commits

...

2 Commits

Author SHA1 Message Date
d6ee9695b0 fix ifelse 2020-10-11 00:18:04 +00:00
0ff01d014a fix command in case adduser no exist 2020-10-10 18:54:44 +00:00

View File

@ -17,7 +17,12 @@ VIRGL_PID="$!"
# Ensure Groups Are Correct
if [ -z "${MCPI_SUBSHELL}" ]; then
if ! id -Gn "$(whoami)" | grep '\bdocker\b' > /dev/null; then
pkexec adduser "$(whoami)" docker
if ! command -v adduser &> /dev/null
then
pkexec usermod -aG "$(whoami)" docker
else
pkexec adduser "$(whoami)" docker
fi
fi
exec sg docker "env MCPI_SUBSHELL=1 \"$(realpath -e "$0")\""
fi