diff --git a/setup.sh b/setup.sh index 4623dc5..75369df 100644 --- a/setup.sh +++ b/setup.sh @@ -121,12 +121,11 @@ 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 - # 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 + # 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. - # 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 + # Install dependencies for hotspot and for building nodogsplash. + sudo apt install -y hostapd dnsmasq git libmicrohttpd-dev libjson-c-dev iptables # Force iptables-legacy for nodogsplash echo "Setting iptables-legacy mode for nodogsplash..." @@ -170,7 +169,7 @@ fi # Stop services to configure # Ensure services exist before trying to stop them sudo systemctl stop hostapd || true -# sudo systemctl stop dnsmasq || true # dnsmasq is no longer used +sudo systemctl stop dnsmasq || true if command -v nodogsplash &> /dev/null; then sudo systemctl stop nodogsplash || true fi @@ -204,25 +203,21 @@ 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 -# dnsmasq is no longer used. nodogsplash will handle DHCP. -# echo "Configuring dnsmasq..." -# sudo tee /etc/dnsmasq.conf > /dev/null < /dev/null < /dev/null < /dev/null; then echo "Attempting to start nodogsplash service..." if ! sudo systemctl restart nodogsplash; then