Check for empty string
This commit is contained in:
parent
ee8870fd7d
commit
3bc378f2a2
|
@ -7548,9 +7548,11 @@ function configure_backup_key {
|
|||
apt-get -y install gnupg
|
||||
|
||||
BACKUP_KEY_EXISTS=$(gpg --list-keys "$MY_NAME (backup key)")
|
||||
if [ $BACKUP_KEY_EXISTS ]; then
|
||||
if [ $BACKUP_KEY_EXISTS != *"error"* ]; then
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
# Generate a GPG key for backups
|
||||
BACKUP_KEY_EXISTS=$(su -c "gpg --list-keys \"$MY_NAME (backup key)\"" - $MY_USERNAME)
|
||||
|
|
Loading…
Reference in New Issue