diff --git a/scripts/setup.sh b/scripts/setup.sh index f78107a..d170bc9 100644 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -138,6 +138,9 @@ fi # 3. NETWORKING echo "Configuring Networking..." +# Ensure radio is unblocked +rfkill unblock wlan || true + # hostapd cat < /etc/hostapd/hostapd.conf interface=wlan0 @@ -166,6 +169,18 @@ if [ -f /etc/dhcpcd.conf ]; then fi fi +# Disable standard wpa_supplicant so it doesn't fight with hostapd +if [ -f /etc/wpa_supplicant/wpa_supplicant.conf ] && [ ! -f /etc/wpa_supplicant/wpa_supplicant.conf.bak ]; then + mv /etc/wpa_supplicant/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant.conf.bak +fi + +# Unmask and enable services +systemctl unmask hostapd 2>/dev/null || true +systemctl unmask dnsmasq 2>/dev/null || true +systemctl enable hostapd +systemctl enable dnsmasq +systemctl enable avahi-daemon + # 4. DEPLOYMENT echo "Deploying Application..." [ -d "$REAL_HOME/mpvj" ] && mv "$REAL_HOME/mpvj" "$REAL_HOME/mpvj.old.$(date +%s)"