Compare commits

...

2 Commits

2 changed files with 12 additions and 7 deletions

View File

@ -39,14 +39,14 @@ USER="$HOME_USER"
if ! id -u $HOME_USER > /dev/null 2>&1; then if ! id -u $HOME_USER > /dev/null 2>&1; then
sudo adduser --disabled-password --gecos "" ${HOME_USER} sudo adduser --disabled-password --gecos "" ${HOME_USER}
sudo echo "$HOME_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null sudo echo "$HOME_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null
fi
# Then execute entrypoint.sh # Check if the .bashrc file exists, if not, create it
if [ "$HOME_USER" != "$(whoami)" ]; then if [ ! -f /home/${HOME_USER}/.bashrc ]; then
exec sudo -u $HOME_USER bash -c "source /etc/environment; /usr/bin/entrypoint.sh" sudo touch /home/${HOME_USER}/.bashrc
fi
# Execute the entrypoint.sh script as the user # Change the ownership of the .bashrc file
else sudo chown ${HOME_USER} /home/${HOME_USER}/.bashrc
# List all environment variables # List all environment variables
sudo env | sudo env |
@ -72,6 +72,11 @@ else
sudo chown -R ${HOME_USER}: /home/${HOME_USER}/.vscode sudo chown -R ${HOME_USER}: /home/${HOME_USER}/.vscode
fi 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 # Find .sh files in /usr/bin/custom-scripts and execute them in order
for script in $(find /usr/bin/custom-scripts -name "*.sh" | sort); do for script in $(find /usr/bin/custom-scripts -name "*.sh" | sort); do
chmod +x $script chmod +x $script

View File

@ -1 +1 @@
3.0.9 3.0.11