github.com/kchristidis/fabric@v1.0.4-0.20171028114726-837acd08cde1/images/testenv/install-softhsm2.sh (about) 1 #!/bin/bash 2 # 3 # Copyright IBM Corp. All Rights Reserved. 4 # 5 # SPDX-License-Identifier: Apache-2.0 6 # 7 8 set -e 9 10 ARCH=`uname -m` 11 12 if [ $ARCH = "s390x" ]; then 13 echo "deb http://ftp.us.debian.org/debian sid main" >> /etc/apt/sources.list 14 fi 15 16 # Install softhsm2 package 17 apt-get update 18 apt-get -y install softhsm2 19 20 # Create tokens directory 21 mkdir -p /var/lib/softhsm/tokens/ 22 23 #Initialize token 24 softhsm2-util --init-token --slot 0 --label "ForFabric" --so-pin 1234 --pin 98765432