Commit dee887e6 authored by Christian Mesh's avatar Christian Mesh Committed by GitHub

Add CHOWN_EXTRA support

CHOWN_EXTRA is a comma separated list of directories to chown.
parent 62360a7e
...@@ -42,6 +42,11 @@ if [ $(id -u) == 0 ] ; then ...@@ -42,6 +42,11 @@ if [ $(id -u) == 0 ] ; then
echo "Changing ownership of /home/$NB_USER to $NB_UID:$NB_GID" echo "Changing ownership of /home/$NB_USER to $NB_UID:$NB_GID"
chown $NB_UID:$NB_GID /home/$NB_USER chown $NB_UID:$NB_GID /home/$NB_USER
fi fi
if [ ! -z "$CHOWN_EXTRA" ]; then
for extra_dir in $(echo $CHOWN_EXTRA | tr ',' ' '); do
chown $NB_UID:$NB_GID $extra_dir
done
fi
# handle home and working directory if the username changed # handle home and working directory if the username changed
if [[ "$NB_USER" != "jovyan" ]]; then if [[ "$NB_USER" != "jovyan" ]]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment