#!/bin/bash set -e mnt=~/mnt/$1 if ! mountpoint -q $mnt; then mkdir -p $mnt sshfs web-$1@karif: $mnt else fusermount -u $mnt rmdir $mnt fi