1
0
forked from finn/tinyboard

add option 0 to reconfigure network via setup.sh

This commit is contained in:
Justin Oros
2026-04-16 15:59:35 -07:00
parent 98986e615b
commit 912e553e06
2 changed files with 10 additions and 3 deletions

View File

@@ -15,14 +15,20 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
header "TinyBoard Setup"
echo ""
echo " 0) Reconfigure network"
echo " 1) Set up this device as a new spoke"
echo " 2) Onboard a new spoke from the hub"
echo " 3) Offboard a spoke from the hub"
echo " 4) Set up this device as a new hub"
echo ""
read -rp "Choose [1/2/3/4]: " CHOICE
read -rp "Choose [0/1/2/3/4]: " CHOICE
case "$CHOICE" in
0)
[ "$(id -u)" -eq 0 ] || die "Network reconfiguration must be run as root"
info "Starting network reconfiguration..."
exec "$SCRIPT_DIR/spoke/setup-network.sh"
;;
1)
[ "$(id -u)" -eq 0 ] || die "Spoke setup must be run as root"
info "Starting spoke setup..."