From 6dda29956708dc5d40c722e8d2cce3790acd421e Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Sat, 6 Jul 2024 19:27:23 +0900 Subject: [PATCH] Improve Apptainer --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 5ca2699..632c4cf 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -11,7 +11,7 @@ trap "echo TRAPed signal" HUP INT QUIT TERM # Wait for XDG_RUNTIME_DIR until [ -d "${XDG_RUNTIME_DIR}" ]; do sleep 0.5; done # Make user directory owned by the default ubuntu user -chown ubuntu:ubuntu /home/ubuntu || sudo-root chown ubuntu:ubuntu /home/ubuntu || chown ubuntu:ubuntu /home/ubuntu/* || sudo-root chown ubuntu:ubuntu /home/ubuntu/* || echo 'Failed to change user directory permissions, there may be permission issues' +chown ubuntu:ubuntu "${HOME}" || sudo-root chown ubuntu:ubuntu "${HOME}" || chown ubuntu:ubuntu "${HOME}/*" || sudo-root chown ubuntu:ubuntu "${HOME}/*" || echo 'Failed to change user directory permissions, there may be permission issues' # Change operating system password to environment variable (echo "$PASSWD"; echo "$PASSWD";) | sudo passwd ubuntu || (echo "mypasswd"; echo "$PASSWD"; echo "$PASSWD";) | passwd ubuntu || echo 'Password change failed, using default password' # Remove directories to make sure the desktop environment starts