diff --git a/entrypoint.sh b/entrypoint.sh index 95afcf4..a5f0d93 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,4 +1,14 @@ #!/bin/bash -[[ -z "${HOME_USER}" ]] && (adduser --disabled-password --gecos "" vscode && echo 'vscode ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers && sudo su - vscode) \ - || (adduser --disabled-password --gecos "" ${HOME_USER} && echo '${HOME_USER} ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers && sudo su - ${HOME_USER}) -[[ -z "${VSCODE_TUNNEL_NAME}" ]] && code tunnel --accept-server-license-terms || code tunnel --accept-server-license-terms --name ${VSCODE_TUNNEL_NAME} \ No newline at end of file +if [[ -z "${HOME_USER}" ]]; then + HOME_USER="vscode" +fi + +adduser --disabled-password --gecos "" ${HOME_USER} +echo "${HOME_USER} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers +sudo su - ${HOME_USER} + +if [[ -z "${VSCODE_TUNNEL_NAME}" ]]; then + code-server tunnel --accept-server-license-terms +else + code-server tunnel --accept-server-license-terms --name ${VSCODE_TUNNEL_NAME} +fi diff --git a/version.txt b/version.txt index ece61c6..f9cbc01 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.0.6 \ No newline at end of file +1.0.7 \ No newline at end of file