From f3a3f66982ac17f4ab12031a46192c788e5d6e57 Mon Sep 17 00:00:00 2001 From: Justin Oros Date: Thu, 16 Apr 2026 10:22:52 -0700 Subject: [PATCH] rewrite setup-hub.sh with multi-distro package manager support --- setup.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index af23b00..04d3f30 100755 --- a/setup.sh +++ b/setup.sh @@ -17,8 +17,9 @@ header "TinyBoard Setup" echo "" echo " 1) Set up this device as a new spoke" echo " 2) Onboard a new spoke from the hub" +echo " 3) Set up this device as a new hub" echo "" -read -rp "Choose [1/2]: " CHOICE +read -rp "Choose [1/2/3]: " CHOICE case "$CHOICE" in 1) @@ -30,6 +31,11 @@ case "$CHOICE" in info "Starting hub onboarding..." exec "$SCRIPT_DIR/hub/onboard-spoke.sh" ;; +3) + [ "$(id -u)" -eq 0 ] || die "Hub setup must be run as root" + info "Starting hub setup..." + exec "$SCRIPT_DIR/hub/setup-hub.sh" + ;; *) die "Invalid choice" ;;