More bugfixes for entrypoint.sh
This commit is contained in:
parent
1643156ee4
commit
e240561fb9
@ -17,7 +17,7 @@ fi
|
|||||||
CURRENT_PASSWD=$(grep -E "^password: .*$" /home/$1/.config/code-server/config.yaml | cut -d ":" -f 2 | awk '{$1=$1;print}')
|
CURRENT_PASSWD=$(grep -E "^password: .*$" /home/$1/.config/code-server/config.yaml | cut -d ":" -f 2 | awk '{$1=$1;print}')
|
||||||
|
|
||||||
if [ -n "$USER_PASSWD" ] && [ "$CURRENT_PASSWD" != "$USER_PASSWD" ] || [ "$CURRENT_PASSWD" == "PASSWORD" ]; then
|
if [ -n "$USER_PASSWD" ] && [ "$CURRENT_PASSWD" != "$USER_PASSWD" ] || [ "$CURRENT_PASSWD" == "PASSWORD" ]; then
|
||||||
if [ -z "${USER_PASSWD}" ]; then
|
if [ -z "$USER_PASSWD" ]; then
|
||||||
USER_PASSWD=$(tr -dc A-Za-z0-9 < /dev/urandom | head -c 20; echo)
|
USER_PASSWD=$(tr -dc A-Za-z0-9 < /dev/urandom | head -c 20; echo)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user