From 7c2398530357cf475f3b4ab52ae87d18ccd0a0f6 Mon Sep 17 00:00:00 2001 From: Gari Singh Date: Sun, 5 Nov 2017 08:02:44 -0500 Subject: [PATCH] [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: Ie3851debd76ff0c50c84e14fbca56de2a28bd825 Signed-off-by: Gari Singh --- first-network/byfn.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/first-network/byfn.sh b/first-network/byfn.sh index 6588e93f54..8e1858c8ea 100755 --- a/first-network/byfn.sh +++ b/first-network/byfn.sh @@ -204,6 +204,9 @@ function generateCerts (){ 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..."