From e90cceb7e85edcecdc3986e8eaa18a98c61bda9d Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Sat, 2 Apr 2022 03:01:45 +0200 Subject: [PATCH] Check if the java process is running. --- 06_workspace_mount.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/06_workspace_mount.sh b/06_workspace_mount.sh index 8e6f4e9..f153666 100644 --- a/06_workspace_mount.sh +++ b/06_workspace_mount.sh @@ -38,9 +38,17 @@ if [ -d /home/${USER}/workspace ]; then fi fi -ln -sf $workspace_dir /home/${USER}/workspace echo "Mount the workspace" su - "$USER" -c "/usr/bin/java -cp .:${workspace_dir}:${workspace_logdir}/ -Dlogback.configurationFile=${workspace_logdir}/logback.xml -jar $workspace_fuse_jar $SHINYPROXY_OIDC_ACCESS_TOKEN $workspace_dir" >/dev/null 2>&1 & -exit $? +_retval= +_fuse_process=$(ps auwwx | grep fuse | grep java) +_retval=$? +if [ $_retval -ne 0 ]; then + echo "The mount of the workspace failed" + exit 1 +fi + +ln -sf $workspace_dir /home/${USER}/workspace +exit 0