From 3f6a9f66266950bcde557c8d4f24c7648b3dca21 Mon Sep 17 00:00:00 2001 From: Alejandro Lembke Barrientos Date: Mon, 15 Apr 2024 05:59:09 +0000 Subject: [PATCH] Updating to version 3.0.9 --- entrypoint.sh | 18 ++++++------------ version.txt | 2 +- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 75ebefe..976fe04 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -39,14 +39,14 @@ USER="$HOME_USER" if ! id -u $HOME_USER > /dev/null 2>&1; then sudo adduser --disabled-password --gecos "" ${HOME_USER} sudo echo "$HOME_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null +fi - # Check if the .bashrc file exists, if not, create it - if [ ! -f /home/${HOME_USER}/.bashrc ]; then - sudo touch /home/${HOME_USER}/.bashrc - fi +# Then execute entrypoint.sh +if [ "$HOME_USER" != "$(whoami)" ]; then + exec sudo -u $HOME_USER bash -c "source /etc/environment; /usr/bin/entrypoint.sh" - # Change the ownership of the .bashrc file - sudo chown ${HOME_USER} /home/${HOME_USER}/.bashrc +# Execute the entrypoint.sh script as the user +else # List all environment variables sudo env | @@ -70,12 +70,6 @@ if ! id -u $HOME_USER > /dev/null 2>&1; then # Changing the property of the directory /home/${HOME_USER}/.vscode sudo chown -R ${HOME_USER}: /home/${HOME_USER}/.vscode - -fi - -# Then execute entrypoint.sh -if [ "$HOME_USER" != "$(whoami)" ]; then - exec sudo -u $HOME_USER bash -c "source /etc/environment; /usr/bin/entrypoint.sh" fi # Find .sh files in /usr/bin/custom-scripts and execute them in order diff --git a/version.txt b/version.txt index e46454b..489200c 100755 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -3.0.8 \ No newline at end of file +3.0.9 \ No newline at end of file