add rough outline routine for reencryption of the vault
This commit is contained in:
parent
60a414de9d
commit
50350b4bed
10
vault.sh
10
vault.sh
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user