Fix shell, fix for GROUP_ID.
All checks were successful
continuous-integration/drone/tag Build is passing
All checks were successful
continuous-integration/drone/tag Build is passing
This commit is contained in:
parent
4871bf22b8
commit
5dae08d7c2
1 changed files with 7 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue