Trying to fix issue of running entrypont.sh as root. Updating to version 2.0.56

This commit is contained in:
Alejandro Lembke Barrientos 2024-04-12 08:42:37 +00:00
parent c27e148488
commit 6519cc3ef9
Signed by: aleleba
GPG Key ID: F48D7CDEB47942BD
2 changed files with 2 additions and 3 deletions

View File

@ -5,7 +5,6 @@ set -eu
if [ "$(id -u)" != "0" ]; then if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2 echo "This script must be run as root" 1>&2
exec sudo /usr/bin/entrypoint.sh exec sudo /usr/bin/entrypoint.sh
exit 0
fi fi
if [[ -z "${HOME_USER-}" ]]; then if [[ -z "${HOME_USER-}" ]]; then
@ -18,7 +17,7 @@ eval "$(fixuid -q)"
if [ "${HOME_USER-}" ]; then if [ "${HOME_USER-}" ]; then
USER="$HOME_USER" USER="$HOME_USER"
if [ "$HOME_USER" != "$(whoami)" ]; then if [[ "${HOME_USER-}" == "vscode" ]]; then
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

View File

@ -1 +1 @@
2.0.55 2.0.56