Ensure permissions before gpg key deletion

This commit is contained in:
Bob Mottram 2017-06-24 19:00:42 +01:00
parent c85ddcb63d
commit 98d4179784
1 changed files with 1 additions and 0 deletions

View File

@ -118,6 +118,7 @@ function gpg_delete_key {
key_username=$1
key_id=$2
chown -R $key_username:$key_username /home/$key_username/.gnupg
su -c "gpg --batch --quiet --homedir=/home/$key_username/.gnupg --delete-secret-key $key_id" - $key_username
su -c "gpg --batch --quiet --homedir=/home/$key_username/.gnupg --delete-key $key_id" - $key_username
}