Browse Source

fix userid comparisons

pull/208/head v1.26.0
Kyle Spearrin 8 years ago
parent
commit
14bac6a744
  1. 5
      entrypoint.sh

5
entrypoint.sh

@ -8,8 +8,7 @@ USERNAME="bitwarden"
CURRENTGID=`getent group $GROUPNAME | cut -d: -f3` CURRENTGID=`getent group $GROUPNAME | cut -d: -f3`
LGID=${LOCAL_GID:-999} LGID=${LOCAL_GID:-999}
CURRENTUID=`id -u $USERNAME` NOUSER=`id -u $USERNAME > /dev/null 2>&1; echo $?`
NOUSER=`$CURRENTUID > /dev/null 2>&1; echo $?`
LUID=${LOCAL_UID:-999} LUID=${LOCAL_UID:-999}
# Step down from host root # Step down from host root
@ -38,7 +37,7 @@ fi
# Create user and assign group # Create user and assign group
if [ $NOUSER == 0 ] && [ "$CURRENTUID" != "$LUID" ] if [ $NOUSER == 0 ] && [ `id -u $USERNAME` != $LUID ]
then then
usermod -u $LUID $USERNAME usermod -u $LUID $USERNAME
elif [ $NOUSER == 1 ] elif [ $NOUSER == 1 ]

Loading…
Cancel
Save