Advertisement
adamchilcott

sshfsSwitch.sh

Oct 10th, 2017
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.64 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. #######################################
  4. # Simple SSHFS-Mount Conditional Switch
  5. #######################################
  6.  
  7. if [ -d "/tmp/sshfs" ]; then
  8.     sh "$HOME/Scripts/sshfs-mount/sshfs-mount" unmount
  9.     sleep 1
  10.     rm --recursive /tmp/sshfs
  11. else
  12.     mkdir /tmp/sshfs
  13.     sleep 1
  14.     modprobe fuse
  15.     sh "$HOME/Scripts/sshfs-mount/sshfs-mount" mount
  16. fi
  17.  
  18. #############
  19. # START NOTES
  20. #############
  21.  
  22. ## This script is targeted at embedded SoC devices, hence 'modprobe fuse'.
  23. ## It relies upon the hardwork of <https://github.com/thefekete>.
  24. ## <https://github.com/thefekete/sshfs-mount>.
  25.  
  26. ###########
  27. # END NOTES
  28. ###########
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement