Skip to content

Commit

Permalink
log if mounting was skipped
Browse files Browse the repository at this point in the history
  • Loading branch information
fekoch committed Jul 15, 2024
1 parent f1a2b85 commit 4197cff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion deployment/provision_vagrant_vm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ OWNER=$(stat -c %u "$MOUNTPOINT/evap")
apt-get -q install -y bindfs
mkdir -p "$REPO_FOLDER"
# remount if REPO_FOLDER does not contain any files (meaning it is not mounted)
[[ -z $(ls -A "$REPO_FOLDER") ]] && bindfs --map="$OWNER/1042:@$OWNER/@1042" "$MOUNTPOINT" "$REPO_FOLDER" || exit 1
if [[ -z $(ls -A "$REPO_FOLDER") ]]; then
bindfs --map="$OWNER/1042:@$OWNER/@1042" "$MOUNTPOINT" "$REPO_FOLDER" || exit 1
else
echo "Skipped trying to mount $REPO_FOLDER - a mounted folder was already detected."
fi
echo "[[ -z \$(ls -A '$REPO_FOLDER') ]] && sudo bindfs --map='$OWNER/1042:@$OWNER/@1042' '$MOUNTPOINT' '$REPO_FOLDER' # remount iff folder empty" >> /home/$USER/.bashrc

# allow ssh login
Expand Down

0 comments on commit 4197cff

Please sign in to comment.