dotfiles/tools/umount-vault

17 lines
425 B
Text
Raw Normal View History

#!/bin/bash
set -e
2016-10-08 07:04:46 +01:00
echo "Unmounting vault.."
sudo umount ~/.vault
2016-10-08 07:04:46 +01:00
echo "Encrypting archive..."
gpg2 -c ~/.vault.zip
2016-10-08 07:04:46 +01:00
echo "Calculating checksum..."
sha512sum ~/.vault.zip.gpg > ~/.vault.zip.gpg.sha512
sha512sum -c ~/.vault.zip.gpg.sha512
cat ~/.vault.zip.gpg.sha512
echo "Moving vault to storage..."
mv ~/.vault.zip.gpg ~/Nextcloud/vault.zip.gpg
2016-10-08 07:04:46 +01:00
mv ~/.vault.zip.gpg.sha512 ~/Nextcloud/vault.zip.gpg.sha512
rm -vfr ~/.vault*