Extra options during gpg key deletion

This commit is contained in:
Bob Mottram 2017-06-23 23:56:14 +01:00
parent 53282fff51
commit d0c6e0f573
1 changed files with 4 additions and 4 deletions

View File

@ -143,10 +143,10 @@ function interactive_gpg_from_usb {
chown -R $MY_USERNAME:$MY_USERNAME $HOME_DIR/.gnupg_old
fi
echo $'Removing old gpg keys'
gpg --homedir=$HOME_DIR/.gnupg --delete-key "$CURR_GPG_BACKUP_ID"
gpg --homedir=$HOME_DIR/.gnupg --delete-key "$CURR_GPG_ID"
gpg --homedir=$HOME_DIR/.gnupg --delete-secret-key "$CURR_GPG_BACKUP_ID"
gpg --homedir=$HOME_DIR/.gnupg --delete-secret-key "$CURR_GPG_ID"
gpg --batch --quiet --homedir=$HOME_DIR/.gnupg --delete-key "$CURR_GPG_BACKUP_ID"
gpg --batch --quiet --homedir=$HOME_DIR/.gnupg --delete-key "$CURR_GPG_ID"
gpg --batch --quiet --homedir=$HOME_DIR/.gnupg --delete-secret-key "$CURR_GPG_BACKUP_ID"
gpg --batch --quiet --homedir=$HOME_DIR/.gnupg --delete-secret-key "$CURR_GPG_ID"
echo $'Importing master keys'
gpg --homedir=$HOME_DIR/.gnupg --allow-secret-key-import --import $USB_MOUNT/.mastergpgkey
echo "$BACKUP_DUMMY_PASSWORD" | gpg --batch --passphrase-fd 0 --homedir=$HOME_DIR/.gnupg --allow-secret-key-import --import $USB_MOUNT/.backupgpgkey