From 7dc0fc86ec44809a22bb219e100121e6c903a166 Mon Sep 17 00:00:00 2001 From: Gaetan Semet Date: Sun, 4 Jun 2017 11:09:24 -0400 Subject: [PATCH] Add logs to start.sh Signed-off-by: Gaetan Semet --- base-notebook/start.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/base-notebook/start.sh b/base-notebook/start.sh index fed516bc..7c2830a5 100755 --- a/base-notebook/start.sh +++ b/base-notebook/start.sh @@ -8,11 +8,13 @@ set -e if [ $UID == 0 ] ; then # Change UID of NB_USER to NB_UID if it does not match if [ "$NB_UID" != $(id -u $NB_USER) ] ; then + echo "Set user UID to: $NB_UID" usermod -u $NB_UID $NB_USER # Careful: $HOME might resolve to /root depending on how the # container is started. Use the $NB_USER home path explicitly. for d in "$CONDA_DIR" "$JULIA_PKGDIR" "/home/$NB_USER"; do if [[ ! -z "$d" && -d "$d" ]]; then + echo "Set ownership to uid $NB_UID: $d" chown -R $NB_UID "$d" fi done @@ -20,6 +22,7 @@ if [ $UID == 0 ] ; then # Change GID of NB_USER to NB_GID if NB_GID is passed as a parameter if [ "$NB_GID" ] ; then + echo "Change GID to $NB_GID" groupmod -g $NB_GID -o $(id -g -n $NB_USER) fi @@ -29,8 +32,10 @@ if [ $UID == 0 ] ; then fi # Exec the command as NB_USER + echo "Execute the command as $NB_USER" exec su $NB_USER -c "env PATH=$PATH $*" else # Exec the command + echo "Execute the command" exec $* fi