From cba3d0eab910e249c9c37ca8c61bcde379922ce8 Mon Sep 17 00:00:00 2001 From: John Lancaster <32917998+jsl12@users.noreply.github.com> Date: Mon, 29 Dec 2025 18:14:47 -0600 Subject: [PATCH] added step-ca installation part --- scripts/setup_wizard.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/scripts/setup_wizard.sh b/scripts/setup_wizard.sh index 26ab8bf..da807af 100755 --- a/scripts/setup_wizard.sh +++ b/scripts/setup_wizard.sh @@ -115,6 +115,30 @@ install_unit() { echo "Starting Interactive Setup..." echo "-----------------------------" +# Verify required external binaries +if ! command -v step >/dev/null 2>&1; then + echo "" >&2 + log_error "Required binary 'step' not found in PATH." + + # Prompt the user to install the step CLI + get_input "INSTALL_STEP" "The 'step' CLI was not found. Install now? (y/n)" "y" "false" + + if [[ "${INSTALL_STEP,,}" == "y" ]]; then + apt-get update && apt-get install -y --no-install-recommends curl vim gpg ca-certificates + curl -fsSL https://packages.smallstep.com/keys/apt/repo-signing-key.gpg -o /etc/apt/trusted.gpg.d/smallstep.asc && \ + echo 'deb [signed-by=/etc/apt/trusted.gpg.d/smallstep.asc] https://packages.smallstep.com/stable/debian debs main' \ + | tee /etc/apt/sources.list.d/smallstep.list + apt-get update && apt-get -y install step-cli step-ca + else + log_error "Cannot continue without 'step'. Aborting." >&2 + exit 1 + fi +else + log_success "Step CA installed\n" +fi + + + # 1. Collect Inputs # Example: get_input "HOST_NAME" "Enter Hostname" "$(hostname)" "false"