Merge pull request #995 from stevenstetzler/stevenstetzler-patch-symlink

Fall back on symlink if mv fails
This commit is contained in:
Peter Parente
2020-01-29 08:28:32 -05:00
committed by GitHub

View File

@@ -66,7 +66,7 @@ if [ $(id -u) == 0 ] ; then
# (it could be mounted, and we shouldn't create it if it already exists)
if [[ ! -e "/home/$NB_USER" ]]; then
echo "Relocating home dir to /home/$NB_USER"
mv /home/jovyan "/home/$NB_USER"
mv /home/jovyan "/home/$NB_USER" || ln -s /home/jovyan "/home/$NB_USER"
fi
# if workdir is in /home/jovyan, cd to /home/$NB_USER
if [[ "$PWD/" == "/home/jovyan/"* ]]; then