diff options
author | Linus Nordberg <linus@nordu.net> | 2015-06-05 16:36:00 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2015-06-05 16:36:00 +0200 |
commit | 165d90b2006f5b01f97f99b1c35f4848e95c5f3c (patch) | |
tree | 2b6e2ca5dd919cc4ab975af224c8955cc347a63e | |
parent | 014495122d6c2c73f4e183b831af477d4fd0dd94 (diff) |
Adjust `-c' argument addServer to reflect certificate naming scheme.
Also, add informative defaults.
-rw-r--r-- | catlfish-dev-lunahsm/start.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/catlfish-dev-lunahsm/start.sh b/catlfish-dev-lunahsm/start.sh index 27a25e7..ab38be6 100644 --- a/catlfish-dev-lunahsm/start.sh +++ b/catlfish-dev-lunahsm/start.sh @@ -1,8 +1,12 @@ #! /bin/sh +[ -z "$HSM_SERVER_NAME" ] && HSM_SERVER_NAME=server-fqdn +[ -z "$HSM_CLIENT_NAME" ] && HSM_CLIENT_NAME=client-fqdn + if ! [ -e /usr/lunasa/cert/client/catlfishKey.pem ]; then /usr/lunasa/bin/vtl addServer \ - -n ${HSM_SERVER_NAME} -c /usr/lunasa/cert/server/${HSM_SERVER_NAME}.pem + -n ${HSM_SERVER_NAME} \ + -c /usr/lunasa/cert/server/${HSM_SERVER_NAME}Cert.pem /usr/lunasa/bin/vtl createCert -n ${HSM_CLIENT_NAME} fi |