From e19b50fe2bc6c6aeff63998788a4965f12904cce Mon Sep 17 00:00:00 2001 From: Chris Frankland-Wright Date: Sat, 30 Aug 2025 22:01:11 +0100 Subject: [PATCH] moved nodogsplash to nmtui --- setup.sh | 78 +++++++++++++------------------------------------------- 1 file changed, 18 insertions(+), 60 deletions(-) diff --git a/setup.sh b/setup.sh index 9a85c3b..9523e4c 100644 --- a/setup.sh +++ b/setup.sh @@ -172,66 +172,24 @@ fi # Configure static IP for wlan0 using NetworkManager (nmcli) echo "Configuring static IP for wlan0 using NetworkManager..." -# Check if a connection for wlan0 already exists and delete it to start fresh -if nmcli -t -f NAME,DEVICE c show --active | grep -q "wlan0"; then - ACTIVE_CON=$(nmcli -t -f NAME,DEVICE c show --active | grep "wlan0" | cut -d':' -f1) - echo "Temporarily deactivating existing connection on wlan0: $ACTIVE_CON" - sudo nmcli c down "$ACTIVE_CON" || true + +# Define the connection name +CON_NAME="TimeTurner-AP" + +# If a connection with this name already exists, delete it to ensure a clean slate. +if nmcli c show --active | grep -q "$CON_NAME"; then + sudo nmcli c down "$CON_NAME" || true +fi +if nmcli c show | grep -q "$CON_NAME"; then + echo "Deleting existing '$CON_NAME' connection profile..." + sudo nmcli c delete "$CON_NAME" || true fi -# Create a new connection profile for the AP -# This sets the static IP and configures it to not manage this interface for other connections. -sudo tee /etc/NetworkManager/conf.d/99-unmanaged-wlan0.conf > /dev/null < /dev/null <