github.com/yous1230/fabric@v2.0.0-beta.0.20191224111736-74345bee6ac2+incompatible/vagrant/softhsm.sh (about)

     1  #!/bin/bash -eu
     2  #
     3  # Copyright IBM Corp. All Rights Reserved.
     4  #
     5  # SPDX-License-Identifier: Apache-2.0
     6  
     7  export DEBIAN_FRONTEND=noninteractive
     8  
     9  # ----------------------------------------------------------------
    10  # Install SoftHSM
    11  # ----------------------------------------------------------------
    12  apt-get install -y softhsm2
    13  
    14  # ----------------------------------------------------------------
    15  # Create tokens directory
    16  # ----------------------------------------------------------------
    17  mkdir -p /home/vagrant/.tokens
    18  chown -R vagrant.vagrant /home/vagrant/.tokens
    19  
    20  # ----------------------------------------------------------------
    21  # Setup softhsm configuration file
    22  # ----------------------------------------------------------------
    23  mkdir -p /home/vagrant/.config/softhsm2
    24  sed s,/var/lib/softhsm/tokens/,/home/vagrant/.tokens,g < /etc/softhsm/softhsm2.conf > /home/vagrant/.config/softhsm2/softhsm2.conf
    25  chown -R vagrant.vagrant /home/vagrant/.config