From 56e54a7320c3b002b8b136ba288784d3d2f4a937 Mon Sep 17 00:00:00 2001 From: stevenstetzler Date: Sun, 19 Jan 2020 23:00:24 -0800 Subject: [PATCH] Fall back on symlink if mv fails --- base-notebook/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base-notebook/start.sh b/base-notebook/start.sh index ead29d4b..da6905be 100755 --- a/base-notebook/start.sh +++ b/base-notebook/start.sh @@ -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