From 10477a66713d7b165b0060220e26a3de35b92a2d Mon Sep 17 00:00:00 2001 From: Ameer Hamza Date: Mon, 11 Dec 2023 13:04:57 +0800 Subject: [PATCH] Fixed the creation and permissions on log file. --- scripts/entrypoint.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index 51ee95b..72f83cd 100755 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -14,7 +14,11 @@ trap 'kill ${!}; term_handler' SIGTERM # setup home directory for the current user. It is useful for attaching vscode with container. sudo mkhomedir_helper `whoami` -sudo touch $LOG_FILE +if [[ $LOG_FILE != "/dev/null" ]]; +then + sudo touch $LOG_FILE + sudo chown -R $(id -u):$(id -g) $LOG_FILE +fi eval $SYS_COMMAND_INIT eval $USER_COMMAND_INIT &