From 579f49ba13489184e41b1e7ee6adb893b454a825 Mon Sep 17 00:00:00 2001 From: Dmitrii Iurco Date: Mon, 25 May 2026 11:34:22 -0400 Subject: [PATCH] Installer: interactive cell identity prompts with live token validation install.sh now guides the user through the full identity setup before running make install: - Cell name prompt with format validation and pic.ngo availability check - Domain mode selection: pic.ngo / Cloudflare / DuckDNS / HTTP-01 / LAN - Cloudflare API token: collected and verified against CF tokens/verify API - DuckDNS: subdomain + token verified against duckdns.org/update - HTTP-01: domain name collected, port-80 warning shown - All collected values passed as env vars to make install - After two failed token attempts user can continue (re-verified at boot) - Final banner shows configured cell name and domain setup_cell.py: updated to handle all domain modes - Reads DOMAIN_MODE / CELL_DOMAIN_NAME / CLOUDFLARE_API_TOKEN / DUCKDNS_TOKEN / DUCKDNS_SUBDOMAIN from env - write_cell_config() now writes domain_mode + domain_name to _identity and builds the ddns section for each provider (not hardcoded to pic_ngo) - register_with_ddns() only called when DOMAIN_MODE == 'pic_ngo' Co-Authored-By: Claude Sonnet 4.6 --- install.sh | 243 ++++++++++++++++++++++++++++++++++++++++-- scripts/setup_cell.py | 84 +++++++++++---- 2 files changed, 298 insertions(+), 29 deletions(-) diff --git a/install.sh b/install.sh index b0beed1..ef6e35d 100755 --- a/install.sh +++ b/install.sh @@ -79,7 +79,56 @@ log_error() { printf "\n${RED}${BOLD}ERROR:${RESET}${RED} %s${RESET}\n" "$1" > die() { log_error "$1"; exit 1; } -TOTAL_STEPS=7 +# --------------------------------------------------------------------------- +# Interactive prompt helpers (use /dev/tty so they work even with piped stdin) +# --------------------------------------------------------------------------- +prompt() { + # prompt