Skip to content

Commit 8199a28

Browse files
committed
fix: suppress warnings
1 parent fc3e400 commit 8199a28

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

entrypoint.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@ USER_NAME=${USER_NAME:-wineuser}
55
USER_UID=${USER_UID:-1010}
66
USER_GID=${USER_GID:-"${USER_UID}"}
77
USER_HOME=${USER_HOME:-/home/"${USER_NAME}"}
8-
USER_PASSWD=${USER_PASSWD:-$(openssl passwd "${USER_NAME}")}
8+
USER_PASSWD=${USER_PASSWD:-$(openssl passwd "${USER_NAME}" 2>/dev/null)}
99
RDP_SERVER=${RDP_SERVER:-no}
1010
RUN_AS_ROOT=${RUN_AS_ROOT:-no}
1111

12-
echo "USER HOME: $USER_HOME"
13-
1412
# Create the user account
15-
groupadd --gid "${USER_GID}" "${USER_NAME}"
13+
! grep -q ":${USER_GID}:$" /etc/group && groupadd --gid "${USER_GID}" "${USER_NAME}"
1614
useradd --shell /bin/bash --uid "${USER_UID}" --gid "${USER_GID}" --password "${USER_PASSWD}" --no-create-home --home-dir "${USER_HOME}" "${USER_NAME}"
1715

1816
# Create the user's home if it doesn't exist

0 commit comments

Comments
 (0)