Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #Script to mount/unmount EncFS encrypted volume(s)
- # _____ _____ ____
- # | ____|_ __ ___| ___/ ___|
- # | _| | '_ \ / __| |_ \___ \
- # | |___| | | | (__| _| ___) |
- # |_____|_| |_|\___|_| |____/
- #Nargren, 2014.06.22.
- ############### CONFIGURE ##############
- #Mount directory location
- mount=/tmp/crypt
- #Encrypted directory location
- crypt=/home/$USER/.encrypted
- #Deafault file manager
- filemanager=nautilus
- ############### MAIN ##############
- echo "Tell me what ya need?"
- PS3='Select an option:'
- select main in "Mount" "Unmount" "Open Folder"
- do
- case $main in
- "Mount")
- echo "Mounting at "$mount
- encfs $crypt $mount
- echo ""
- echo "
- 1) Mount
- 2) Unmount
- 3) Open Folder"
- ;;
- "Unmount")
- echo "Unmounting..."
- fusermount -u /tmp/crypt
- echo "Volume has been unmounted!"
- echo ""
- echo "
- 1) Mount
- 2) Unmount
- 3) Open Folder"
- ;;
- "Open Folder")
- echo "Opening "$mount"..."
- $filemanager $mount
- echo ""
- echo "
- 1) Mount
- 2) Unmount
- 3) Open Folder"
- ;;
- *) echo PEBKAC;;
- esac
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement