From 48d2fd6bb45003430d9bb57e5277350f7961fc81 Mon Sep 17 00:00:00 2001
From: Robert Martin-Legene <robert@nic.ar>
Date: Wed, 26 Sep 2018 17:50:45 -0300
Subject: [PATCH] Do proper check, to see if we should create account

---
 bin/libbfa.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/libbfa.sh b/bin/libbfa.sh
index cb2743c..d560c9b 100644
--- a/bin/libbfa.sh
+++ b/bin/libbfa.sh
@@ -182,7 +182,7 @@ fi
 # BFAACCOUNT
 if [ -z "$BFAACCOUNT" ]
 then
-    if [ ! -d "${BFANODEDIR}/keystore" ]
+    if ! ls -1d ${BFANODEDIR}/keystore/*--* >/dev/null 2>&1
     then
         echo "No accounts found. Creating a new one (they are free)."
         geth --cache 0 --datadir ${BFANODEDIR} --password /dev/null account new
-- 
GitLab