From 3bc378f2a2c459b4aa66a4d7893f778137950d1b Mon Sep 17 00:00:00 2001
From: Bob Mottram <bob@robotics.uk.to>
Date: Fri, 27 Nov 2015 08:09:36 +0000
Subject: [PATCH] Check for empty string

---
 src/freedombone | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/freedombone b/src/freedombone
index 606d0ced4..32d901fa6 100755
--- a/src/freedombone
+++ b/src/freedombone
@@ -7548,8 +7548,10 @@ function configure_backup_key {
   apt-get -y install gnupg
 
   BACKUP_KEY_EXISTS=$(gpg --list-keys "$MY_NAME (backup key)")
-  if [ $BACKUP_KEY_EXISTS != *"error"* ]; then
-      return
+  if [ $BACKUP_KEY_EXISTS ]; then
+      if [ $BACKUP_KEY_EXISTS != *"error"* ]; then
+          return
+      fi
   fi
 
   # Generate a GPG key for backups
-- 
GitLab