mirror of
https://github.com/bitwarden/browser
synced 2024-12-25 09:32:06 +01:00
fix userid comparisons
This commit is contained in:
parent
05cc9b45e6
commit
14bac6a744
@ -8,8 +8,7 @@ USERNAME="bitwarden"
|
||||
CURRENTGID=`getent group $GROUPNAME | cut -d: -f3`
|
||||
LGID=${LOCAL_GID:-999}
|
||||
|
||||
CURRENTUID=`id -u $USERNAME`
|
||||
NOUSER=`$CURRENTUID > /dev/null 2>&1; echo $?`
|
||||
NOUSER=`id -u $USERNAME > /dev/null 2>&1; echo $?`
|
||||
LUID=${LOCAL_UID:-999}
|
||||
|
||||
# Step down from host root
|
||||
@ -38,7 +37,7 @@ fi
|
||||
|
||||
# Create user and assign group
|
||||
|
||||
if [ $NOUSER == 0 ] && [ "$CURRENTUID" != "$LUID" ]
|
||||
if [ $NOUSER == 0 ] && [ `id -u $USERNAME` != $LUID ]
|
||||
then
|
||||
usermod -u $LUID $USERNAME
|
||||
elif [ $NOUSER == 1 ]
|
||||
|
Loading…
Reference in New Issue
Block a user