Guest User

Untitled

a guest
May 26th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. #put name of device here
  4. MYMOUNTDIR=/mnt/location/here
  5. PASSFILE=/home/yourname/passfile.kdb
  6. DEVICEDIR=/dev/sdc1
  7.  
  8. if [ -b /dev/sdc ]; then
  9. echo Mounting /dev/sdc
  10. exo-mount -d $DEVICEDIR || exit 1
  11. fi
  12.  
  13. if [ -d $MYMOUNTDIR ]; then
  14. echo Rsyncing passwords to $MYMOUNTDIR
  15. rsync --verbose $PASSFILE $MYMOUNTDIR || exit 1
  16. else
  17. echo $MYMOUNTDIR does not exist, this is not your USB drive
  18. fi
  19.  
  20. if [ -b /dev/sdc ]; then
  21. echo Unmounting $DEVICEDIR
  22. exo-unmount -d $DEVICEDIR || exit 1
  23. fi
Add Comment
Please, Sign In to add comment