fabric-samples/distributed-deploy/bcp-install-main/resources/generateInstallPackage/masterPackage/template/fetchGenesisBlock.sh
zeoio fa0b04aaeb distributed-depoly: add copyright to codes, configs file
Signed-off-by: zeoio <kinsleer@outlook.com>
2020-04-29 10:01:42 +08:00

20 lines
548 B
Bash

#!/bin/bash
#
# Copyright CGB Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
CHANNEL_NAME="$1"
ORDERER_CA="$2"
CORE_PEER_LOCALMSPID="$3"
CORE_PEER_ADDRESS="$4"
CORE_PEER_TLS_ROOTCERT_FILE="$5"
CORE_PEER_MSPCONFIGPATH="$6"
export CORE_PEER_LOCALMSPID=${CORE_PEER_LOCALMSPID}
export CORE_PEER_MSPCONFIGPATH=${CORE_PEER_MSPCONFIGPATH}
peer channel fetch config channel-artifacts/genesis.block -o $CORE_PEER_ADDRESS -c $CHANNEL_NAME --tls --cafile $ORDERER_CA
cp -r channel-artifacts/genesis.block /host/var/run/genesis.block