Fix shell, fix for GROUP_ID.
All checks were successful
continuous-integration/drone/tag Build is passing

This commit is contained in:
michael 2020-08-11 16:02:46 -05:00
parent 4871bf22b8
commit 5dae08d7c2

View file

@ -5,8 +5,14 @@
USER_ID=${PUID:-9001}
GROUP_ID=${PGID:-$USER_ID}
echo "Starting with UID : $USER_ID:$GROUP_ID"
GROUP=proton
if getent group $GROUP_ID > /dev/null; then
GROUP=$(getent group $GROUP_ID | cut -d: -f1)
else
groupadd -g $GROUP_ID $GROUP
fi
addgroup -g $GROUP_ID proton
adduser -D -u $USER_ID -G proton -h /var/lib/proton -s /bin/bash proton
adduser -D -u $USER_ID -G $GROUP -h /var/lib/proton -s /bin/sh proton
chown -R ${USER_ID}:${GROUP_ID} /var/lib/proton
export HOME=/var/lib/proton