Skip to content
Snippets Groups Projects
Commit b58e8461 authored by Robert Martin-Legene's avatar Robert Martin-Legene
Browse files

Automatically create new account for firsttimers

parent 477b317e
No related branches found
No related tags found
No related merge requests found
......@@ -150,12 +150,24 @@ function account
if [ -z "$account" ]
then
test -d "${BFANODEDIR}/keystore"
account=$( ls -1dl "${BFANODEDIR}"/keystore/*--* | head -1 | sed 's/.*--//' )
account=$(
ls -1dl "${BFANODEDIR}"/keystore/*--* 2>/dev/null |
head -1 |
sed 's/.*--//'
)
fi
if [ -z "$account" ]
then
fatal "No accounts found. Consider running: geth --datadir ${BFANETWORKDIR}/node1 --password /dev/null account new"
fatal "No accounts found. Creating a new one (they are free)"
geth --datadir ${BFANODEDIR} --password /dev/null account new
if [ -n "$loop_protection" ]
then
fatal "Loop detected."
fi
loop_protection=1
account
fi
unset loop_protection
}
function bfaconfig
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment