-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcopyKeys.sh
More file actions
executable file
·48 lines (36 loc) · 950 Bytes
/
copyKeys.sh
File metadata and controls
executable file
·48 lines (36 loc) · 950 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
# ========= hf-server ============
#
# Autor: Antonio Paya Gonzalez
#
# ================================
# ============ VARIABLES =============
DIR=$PWD/keys
BLOCKDIR="$1"
OPTS="-i"
function copyHfc(){
cd $PWD
if [ -d ./keys ]; then
rm -rf ./keys
fi
echo
echo "---------- Copiando hfc-key-store --------------"
echo
mkdir keys
cd $DIR
cp -a $BLOCKDIR/hfc-key-store/asturias/. $DIR
}
function copyPeerOrderer(){
echo
echo "---------- Copiando peer keys--------------"
echo
cd $DIR
cp $BLOCKDIR/crypto-config/peerOrganizations/asturias.antonio.com/peers/peer0.asturias.antonio.com/msp/tlscacerts/tlsca.asturias.antonio.com-cert.pem $DIR
echo
echo "---------- Copiando orderer keys--------------"
echo
cd $DIR
cp $BLOCKDIR/crypto-config/ordererOrganizations/antonio.com/msp/tlscacerts/tlsca.antonio.com-cert.pem $DIR
}
copyHfc
copyPeerOrderer