add rough outline routine for reencryption of the vault

This commit is contained in:
Johanna Dorothea Reichmann 2019-08-03 18:07:11 +02:00
parent 60a414de9d
commit 50350b4bed
Signed by: transcaffeine
GPG Key ID: 03624C433676E465

View File

@ -19,11 +19,17 @@ fi
case "$ACTION" in
"decrypt")
gpg2 --batch --use-agent --decrypt $(dirname $0)/vault_passphrase.gpg 2>/dev/null
gpg2 --batch --use-agent --decrypt $VAULT_PASS_FILE 2>/dev/null
;;
"reencrypt")
gpg2 --batch --use-agent --output $REPO_BASE_PATH/gpg/vault_passphrase --decrypt $VAULT_PASS_FILE
CMD="gpg2 --batch --use-agent --armor --output $VAULT_PASS_FILE"
for FINGERPRINT in $(cat KEY_FILE) do
CMD="$CMD --recipient $FINGERPRINT"
done
CMD="$CMD --encrypt $REPO_BASE_PATH/gpg/vault_passhphrase"
$($CMD)
;;
"init")