forked from finn/tinyboard
add option 0 to reconfigure network via setup.sh
This commit is contained in:
8
setup.sh
8
setup.sh
@@ -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..."
|
||||
|
||||
Reference in New Issue
Block a user