wizard now bootstrapping cert if it doesn't exist

This commit is contained in:
John Lancaster
2025-12-29 23:45:42 -06:00
parent 487dfe2e45
commit b0f1ae358b

View File

@@ -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