Merge pull request 'Fix the check, for real this time.' (#16) from andrea.dellamico/docker-jenkins-integration-test:master into master

Reviewed-on: #16
This commit is contained in:
Andrea Dell'Amico 2022-04-02 02:00:18 +02:00
commit a2f250aa14
1 changed files with 7 additions and 7 deletions

View File

@ -30,14 +30,14 @@ _retval=
if [ -d /home/${USER}/workspace ]; then if [ -d /home/${USER}/workspace ]; then
rmdir /home/${USER}/workspace rmdir /home/${USER}/workspace
_retval=$? _retval=$?
if [ $_retval -ne 0 ]; then
echo "The user has a directory named 'workspace' inside their home directory and it is not empty."
echo "Not starting the workspace mount"
exit $_retval
fi
fi fi
if [ $_retval -ne 0 ]; then
echo "The user has a directory named 'workspace' inside their home directory and it is not empty." ln -sf /home/${USER}/workspace $workspace_dir
echo "Not starting the workspace mount"
exit
else
ln -s /home/${USER}/workspace $workspace_dir
fi
echo "Mount the 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 & 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 &