Fix the check of a workspace dir inside the home.

This commit is contained in:
Andrea Dell'Amico 2022-04-02 01:52:25 +02:00
parent b2a4c0ec51
commit c000941b9f
Signed by: andrea.dellamico
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 5 additions and 3 deletions

View File

@ -27,10 +27,12 @@ chown ${USER}:${USER} $workspace_dir
chown -R ${USER}:${USER} $workspace_logdir
_retval=
/bin/rm /home/${USER}/workspace
_retval=$?
if [ -d /home/${USER}/workspace ]; then
rmdir /home/${USER}/workspace
_retval=$?
fi
if [ $_retval -ne 0 ]; then
echo "The user has a directory named 'workspace' inside their home directory"
echo "The user has a directory named 'workspace' inside their home directory and it is not empty."
echo "Not starting the workspace mount"
exit
else