CHecksum calculation
This commit is contained in:
parent
c6933ab7bd
commit
a497edf8b9
2 changed files with 12 additions and 1 deletions
|
@ -2,7 +2,10 @@
|
|||
|
||||
set -e
|
||||
echo "decrypting..."
|
||||
gpg2 -d ~/Nextcloud/vault.zip.gpg > ~/.vault.zip
|
||||
cp -v ~/Nextcloud/vault.zip.gpg ~/.vault.zip.gpg
|
||||
cp -v ~/Nextcloud/vault.zip.gpg.sha512 ~/.vault.zip.gpg.sha512
|
||||
sha512sum -c ~/.vault.zip.gpg.sha512
|
||||
gpg2 -d ~/.vault.zip.gpg > ~/.vault.zip
|
||||
echo "mounting..."
|
||||
mkdir -p ~/.vault
|
||||
archivemount -o nobackup ~/.vault.zip ~/.vault
|
||||
|
|
|
@ -1,8 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
echo "Unmounting vault.."
|
||||
sudo umount ~/.vault
|
||||
echo "Encrypting archive..."
|
||||
gpg2 -c ~/.vault.zip
|
||||
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
|
||||
mv ~/.vault.zip.gpg.sha512 ~/Nextcloud/vault.zip.gpg.sha512
|
||||
rm -vfr ~/.vault*
|
||||
|
||||
|
|
Loading…
Reference in a new issue