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

@@ -31,8 +31,8 @@ On a fresh Armbian device:
apt install git apt install git
git clone https://gut.oily.dad/justin/tinyboard git clone https://gut.oily.dad/justin/tinyboard
cd tinyboard cd tinyboard
./spoke/setup-network.sh # configure static IP — SSH session will drop, reconnect ./setup.sh # choose option 0 to configure static IP — SSH session will drop, reconnect
./setup.sh # choose option 1 ./setup.sh # choose option 1
``` ```
### Onboarding a Spoke from the Hub ### Onboarding a Spoke from the Hub
@@ -94,6 +94,7 @@ tinyboard/
### `setup.sh` ### `setup.sh`
Entry point. Presents a menu: Entry point. Presents a menu:
0. Reconfigure network (static IP via netplan — SSH session will drop, reconnect)
1. Set up this device as a new spoke 1. Set up this device as a new spoke
2. Onboard a new spoke from the hub 2. Onboard a new spoke from the hub
3. Offboard a spoke from the hub 3. Offboard a spoke from the hub

View File

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