upsert bitwarden user
This commit is contained in:
parent
832ddddc58
commit
3c5022d628
|
@ -1,6 +1,14 @@
|
||||||
#!/bin/sh
|
#!/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
|
chown -R bitwarden:bitwarden /etc/bitwarden
|
||||||
cp /etc/bitwarden/web/settings.js /app/js/settings.js
|
cp /etc/bitwarden/web/settings.js /app/js/settings.js
|
||||||
|
|
Loading…
Reference in New Issue