Skip to content

Instantly share code, notes, and snippets.

@bellaj
Created August 30, 2023 13:56
Show Gist options
  • Save bellaj/21046734954ef4393fd5b734b936ffc6 to your computer and use it in GitHub Desktop.
Save bellaj/21046734954ef4393fd5b734b936ffc6 to your computer and use it in GitHub Desktop.
#!/bin/bash
source ./reenroll.sh
# Backup the cert for ordererOrg
cp ./organizations/fabric-ca/ordererOrg/tls-cert.pem ./organizations/fabric-ca/ordererOrg/tls-cert.pem.bak
rm ./organizations/fabric-ca/ordererOrg/tls-cert.pem
docker restart ca_orderer
sleep 10
createOrderer
# Backup the cert for org1
cp ./organizations/fabric-ca/org1/tls-cert.pem ./organizations/fabric-ca/org1/tls-cert.pem.bak
rm ./organizations/fabric-ca/org1/tls-cert.pem
docker restart ca_org1
sleep 10
createOrg1
docker restart $(docker ps -aq)
sleep 30
echo "script ends"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment