From a764b4d4ad4e47c7227c68681b33a92d3870b7d6 Mon Sep 17 00:00:00 2001 From: Chris Frankland-Wright Date: Sat, 30 Aug 2025 22:12:32 +0100 Subject: [PATCH] remove dnsmasq --- setup.sh | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/setup.sh b/setup.sh index 2b69b8f..9b4851e 100644 --- a/setup.sh +++ b/setup.sh @@ -121,10 +121,14 @@ echo "NTPD removed (if present). Chrony, NMTUI, and Adjtimex installed and confi echo "📡 Installing and configuring WiFi hotspot and captive portal..." if [ "$PKG_MANAGER" == "apt" ]; then - # Install dependencies for hotspot and for building nodogsplash - sudo apt install -y hostapd dnsmasq git libmicrohttpd-dev libjson-c-dev iptables + # Ensure dnsmasq is removed to prevent conflicts with nodogsplash's DHCP server. + echo "Removing dnsmasq to prevent conflicts..." + sudo apt-get remove --purge -y dnsmasq || true + + # Install dependencies for hotspot and for building nodogsplash. dnsmasq is no longer needed. + sudo apt install -y hostapd git libmicrohttpd-dev libjson-c-dev iptables - # Force iptables-legacy for nodogsplash compatibility + # Force iptables-legacy for nodogsplash echo "Setting iptables-legacy mode for nodogsplash..." sudo update-alternatives --set iptables /usr/sbin/iptables-legacy sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy @@ -166,7 +170,7 @@ fi # Stop services to configure # Ensure services exist before trying to stop them sudo systemctl stop hostapd || true -sudo systemctl stop dnsmasq || true +# sudo systemctl stop dnsmasq || true # dnsmasq is no longer used if command -v nodogsplash &> /dev/null; then sudo systemctl stop nodogsplash || true fi @@ -200,21 +204,25 @@ sudo nmcli c modify "$CON_NAME" 802-11-wireless-security.key-mgmt wpa-psk sudo nmcli c modify "$CON_NAME" 802-11-wireless-security.psk "harry-ron-hermione" sudo nmcli c modify "$CON_NAME" ipv4.method manual ipv4.addresses 10.0.252.1/24 -# Configure dnsmasq for DHCP -echo "Configuring dnsmasq..." -sudo tee /etc/dnsmasq.conf > /dev/null < /dev/null < /dev/null < /dev/null; then sudo systemctl restart nodogsplash fi