Created
June 22, 2022 19:23
-
-
Save trebortech/246b4f45ce00433cc08ab04fe4deed75 to your computer and use it in GitHub Desktop.
Multiple YubiHSM startup shell script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
connector_path=/home/pi/yubihsm/yubihsm-connector | |
hsm1_serial=123456 | |
hsm1_listen=172.16.16.10:1111 | |
hsm2_serial=4234234 | |
hsm2_listen=172.16.16.10:2222 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
configfile='./hsm_list.config' | |
. $configfile | |
hsmcount=$(grep -c 'serial' $configfile) | |
for (( c=1; c<=$hsmcount; c++)) | |
do | |
hsmserial="hsm${c}_serial" | |
hsmlisten="hsm${c}_listen" | |
$connector_path --listen ${!hsmlisten} --serial ${!hsmserial} & | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment