diff --git a/scripts/setup_wizard.sh b/scripts/setup_wizard.sh index 1c55361..a87fcbf 100755 --- a/scripts/setup_wizard.sh +++ b/scripts/setup_wizard.sh @@ -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