summaryrefslogtreecommitdiffstats
path: root/sftp-mount.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sftp-mount.sh')
-rwxr-xr-xsftp-mount.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/sftp-mount.sh b/sftp-mount.sh
new file mode 100755
index 0000000..e2fb3ae
--- /dev/null
+++ b/sftp-mount.sh
@@ -0,0 +1,13 @@
+#!/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