Fix adduser usage on some OSes where adduser does not exist #2

Closed
gamer4life1 wants to merge 2 commits from gamer4life1/minecraft-pi-docker:master into master
1 changed files with 2 additions and 1 deletions
Showing only changes of commit d6ee9695b0 - Show all commits

View File

@ -20,8 +20,9 @@ if [ -z "${MCPI_SUBSHELL}" ]; then
if ! command -v adduser &> /dev/null
then
pkexec usermod -aG "$(whoami)" docker
else
pkexec adduser "$(whoami)" docker
fi
pkexec adduser "$(whoami)" docker
fi
exec sg docker "env MCPI_SUBSHELL=1 \"$(realpath -e "$0")\""
fi