wizard now bootstrapping cert if it doesn't exist
This commit is contained in:
@@ -159,7 +159,14 @@ export KEY_LOCATION=$(readlink -f $KEY_LOCATION)
|
||||
confirm_inputs "CERT_LOCATION" "KEY_LOCATION"
|
||||
|
||||
if [ ! -f "$CERT_LOCATION" ] || [ ! -f "$KEY_LOCATION" ]; then
|
||||
log_error "Certificate or key file does not exist at specified locations."
|
||||
(umask 077; mkdir -p "${CERT_DIR}")
|
||||
cd "${CERT_DIR}"
|
||||
step ca root root_ca.crt
|
||||
hostname=$(hostname -s) step ca certificate "$hostname" cert.pem key.pem \
|
||||
--san "$hostname" \
|
||||
--san "$hostname.john-stream.com" \
|
||||
--san "$IP_ADDRESS" \
|
||||
--provisioner admin
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user