Compare commits

...

8 Commits

2 changed files with 17 additions and 1 deletions

View File

@ -1,6 +1,13 @@
#!/bin/bash
set -eu
# Check if we are root
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exec sudo /usr/bin/entrypoint.sh
exit 0
fi
if [[ -z "${HOME_USER-}" ]]; then
HOME_USER="vscode"
fi
@ -55,6 +62,15 @@ if [ "${HOME_USER-}" ]; then
# Source the .bashrc file to apply the changes immediately
sudo su -l ${HOME_USER} -c "source ~/.bashrc"
# Delete the vscode user
if id "vscode" &>/dev/null; then
sudo chown -R vscode:vscode /home/vscode
sudo userdel -r vscode
fi
else
# Switch to the user specified by $HOME_USER and start an interactive shell session.
sudo su -l ${HOME_USER}
fi
fi

View File

@ -1 +1 @@
2.0.47
2.0.55