Advertisement
Nargren

crypt.mount

Sep 21st, 2014
498
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.04 KB | None | 0 0
  1. #!/bin/bash
  2. #Script to mount/unmount EncFS encrypted volume(s)
  3.  
  4. #  _____            _____ ____  
  5. # | ____|_ __   ___|  ___/ ___|
  6. # |  _| | '_ \ / __| |_  \___ \
  7. # | |___| | | | (__|  _|  ___) |
  8. # |_____|_| |_|\___|_|   |____/          
  9.  
  10. #Nargren, 2014.06.22.
  11.  
  12. ############### CONFIGURE ##############
  13.  
  14. #Mount directory location
  15. mount=/tmp/crypt
  16.  
  17. #Encrypted directory location
  18. crypt=/home/$USER/.encrypted
  19.  
  20. #Deafault file manager
  21. filemanager=nautilus
  22.  
  23. ############### MAIN ##############
  24. echo "Tell me what ya need?"
  25. PS3='Select an option:'
  26. select main in "Mount" "Unmount" "Open Folder"
  27. do
  28. case $main in
  29.  
  30. "Mount")
  31. echo "Mounting at "$mount
  32. encfs $crypt $mount
  33. echo ""
  34. echo "
  35. 1) Mount
  36. 2) Unmount
  37. 3) Open Folder"
  38. ;;
  39.  
  40. "Unmount")
  41. echo "Unmounting..."
  42. fusermount -u /tmp/crypt
  43. echo "Volume has been unmounted!"
  44. echo ""
  45. echo "
  46. 1) Mount
  47. 2) Unmount
  48. 3) Open Folder"
  49. ;;
  50.  
  51. "Open Folder")
  52. echo "Opening "$mount"..."
  53. $filemanager $mount
  54. echo ""
  55. echo "
  56. 1) Mount
  57. 2) Unmount
  58. 3) Open Folder"
  59. ;;
  60. *) echo PEBKAC;;
  61. esac
  62. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement