2016-10-07 21:46:23 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
2016-10-08 07:04:46 +01:00
|
|
|
echo "Unmounting vault.."
|
2016-10-07 22:40:00 +01:00
|
|
|
sudo umount ~/.vault
|
2016-10-08 07:04:46 +01:00
|
|
|
echo "Encrypting archive..."
|
2016-10-07 22:40:00 +01:00
|
|
|
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..."
|
2016-10-07 22:40:00 +01:00
|
|
|
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
|
2016-10-07 21:46:23 +01:00
|
|
|
rm -vfr ~/.vault*
|
|
|
|
|