diff --git a/setup.sh b/setup.sh index ce1bf72..eb1be25 100644 --- a/setup.sh +++ b/setup.sh @@ -116,6 +116,80 @@ fi echo "NTPD removed (if present). Chrony, NMTUI, and Adjtimex installed and configured." +# --- Install and configure WiFi hotspot and captive portal --- +echo "📡 Installing and configuring WiFi hotspot and captive portal..." + +if [ "$PKG_MANAGER" == "apt" ]; then + sudo apt install -y hostapd dnsmasq nodogsplash + sudo systemctl unmask hostapd + sudo systemctl enable hostapd + sudo systemctl enable nodogsplash +fi + +# Stop services to configure +sudo systemctl stop hostapd +sudo systemctl stop dnsmasq +sudo systemctl stop nodogsplash + +# Configure static IP for wlan0 +echo "Configuring static IP for wlan0..." +sudo sed -i '/^interface wlan0/d' /etc/dhcpcd.conf +sudo tee -a /etc/dhcpcd.conf > /dev/null < /dev/null < /dev/null < /dev/null <