allow update of nodogsplash

This commit is contained in:
Chris Frankland-Wright 2025-08-30 22:32:03 +01:00
parent 6221eea98c
commit 169c9b9aef

View file

@ -136,6 +136,10 @@ echo "NTPD removed (if present). Chrony, NMTUI, and Adjtimex installed and confi
echo "📡 Installing and configuring WiFi hotspot and captive portal..." echo "📡 Installing and configuring WiFi hotspot and captive portal..."
if [ "$PKG_MANAGER" == "apt" ]; then if [ "$PKG_MANAGER" == "apt" ]; then
# Stop the service if it's running from a previous installation to prevent "Text file busy" error.
echo "Stopping existing nodogsplash service before installation..."
sudo systemctl stop nodogsplash || true
# We will use dnsmasq for DHCP, as the compiled nodogsplash version may not support the internal DHCP server. # We will use dnsmasq for DHCP, as the compiled nodogsplash version may not support the internal DHCP server.
# sudo apt-get remove --purge -y dnsmasq || true # This line is no longer needed. # sudo apt-get remove --purge -y dnsmasq || true # This line is no longer needed.
@ -187,9 +191,6 @@ fi
# Ensure services exist before trying to stop them # Ensure services exist before trying to stop them
sudo systemctl stop hostapd || true sudo systemctl stop hostapd || true
sudo systemctl stop dnsmasq || true sudo systemctl stop dnsmasq || true
if command -v nodogsplash &> /dev/null; then
sudo systemctl stop nodogsplash || true
fi
# Ensure NetworkManager is managing wlan0 by removing any conflicting configurations. # Ensure NetworkManager is managing wlan0 by removing any conflicting configurations.
# This is the critical fix for the "No suitable device" error. # This is the critical fix for the "No suitable device" error.