From dc436a7687629fcf9d0b05da0286db971d8d893f Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 23 Jun 2017 22:27:42 +0100 Subject: [PATCH] Tidying --- src/freedombone-utils-keys | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/freedombone-utils-keys b/src/freedombone-utils-keys index c021e8f8..bba6db38 100755 --- a/src/freedombone-utils-keys +++ b/src/freedombone-utils-keys @@ -128,12 +128,12 @@ function interactive_gpg_from_usb { echo $'No backup key file found on USB drive' exit 725729 fi - gpg --homedir=/home/$MY_USERNAME/.gnupg --allow-secret-key-import --import $USB_MOUNT/.mastergpgkey - echo "$BACKUP_DUMMY_PASSWORD" | gpg --batch --passphrase-fd 0 --homedir=/home/$MY_USERNAME/.gnupg --allow-secret-key-import --import $USB_MOUNT/.backupgpgkey - if [ -d /home/$MY_USERNAME/.gnupg ]; then - chmod 700 /home/$MY_USERNAME/.gnupg - chmod -R 600 /home/$MY_USERNAME/.gnupg/* - chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.gnupg + 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 + if [ -d $HOME_DIR/.gnupg ]; then + chmod 700 $HOME_DIR/.gnupg + chmod -R 600 $HOME_DIR/.gnupg/* + chown -R $MY_USERNAME:$MY_USERNAME $HOME_DIR/.gnupg fi GPG_LOADING="no" dialog --title $"Recover Encryption Keys" \