1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-26 12:25:20 +01:00

upsert bitwarden user

This commit is contained in:
Kyle Spearrin 2018-03-27 16:37:50 -04:00
parent 832ddddc58
commit 3c5022d628

View File

@ -1,6 +1,14 @@
#!/bin/sh
useradd -r -u ${LOCAL_UID:-999} -g bitwarden bitwarden
NOUSER=`id -u bitwarden > /dev/null 2>&1; echo $?`
LUID=${LOCAL_UID:-999}
if [[ $NOUSER == 0 && `id -u bitwarden` != $LUID ]]
then
usermod -u $LUID bitwarden
elif [ $NOUSER == 1 ]
then
useradd -r -u $LUID -g bitwarden bitwarden
fi
chown -R bitwarden:bitwarden /etc/bitwarden
cp /etc/bitwarden/web/settings.js /app/js/settings.js