Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #put name of device here
- MYMOUNTDIR=/mnt/location/here
- PASSFILE=/home/yourname/passfile.kdb
- DEVICEDIR=/dev/sdc1
- if [ -b /dev/sdc ]; then
- echo Mounting /dev/sdc
- exo-mount -d $DEVICEDIR || exit 1
- fi
- if [ -d $MYMOUNTDIR ]; then
- echo Rsyncing passwords to $MYMOUNTDIR
- rsync --verbose $PASSFILE $MYMOUNTDIR || exit 1
- else
- echo $MYMOUNTDIR does not exist, this is not your USB drive
- fi
- if [ -b /dev/sdc ]; then
- echo Unmounting $DEVICEDIR
- exo-unmount -d $DEVICEDIR || exit 1
- fi
Add Comment
Please, Sign In to add comment