added step-ca installation part
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user