Created
January 22, 2014 07:33
-
-
Save ducin/8554814 to your computer and use it in GitHub Desktop.
simple script opening/closing sshfs connection with ./sshfs.sh -o or ./sshfs.sh -c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$1" != "" ]; then | |
case $1 in | |
-o | --open ) echo "$USER opening sshfs connection" | |
open your connection here | |
;; | |
-c | --close ) echo "$USER closing sshfs connection" | |
close your connection here | |
;; | |
-h | --help ) echo "Use one of the options: -o/--open or -c/--close" | |
esac | |
else | |
echo "No option chosen" | |
echo "Use one of the options: -o/--open or -c/--close" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment