1
0
forked from finn/tinyboard

rewrite setup-hub.sh with multi-distro package manager support

This commit is contained in:
Justin Oros
2026-04-16 10:22:52 -07:00
parent 384cf476ff
commit f3a3f66982

View File

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