[FAB-5221] generateCerts should delete crypto

It's possible to run byfn -m generate multiple
times depending on how you go through the
tutorials, start/stop the network, etc.
The crypto-config folder is deleted when
running byfn -m down and that will stay,
but now each time generateCerts is run the
cyrpto-config folder will be deleted as well.

Change-Id: Ib80d720bfdec1ffe100b1b6b5c752e72b583890b
Signed-off-by: Gari Singh <gari.r.singh@gmail.com>
This commit is contained in:
Gari Singh 2017-11-05 08:10:03 -05:00
parent 6a5a1c3183
commit b99e1b8da2

View file

@ -201,7 +201,9 @@ function generateCerts (){
echo "##########################################################"
echo "##### Generate certificates using cryptogen tool #########"
echo "##########################################################"
if [ -d "crypto-config" ]; then
rm -Rf crypto-config
fi
cryptogen generate --config=./crypto-config.yaml
if [ "$?" -ne 0 ]; then
echo "Failed to generate certificates..."