fix: enforce absolute unmasking and disable default wifi networking to ensure AP mode success

This commit is contained in:
Timothy Hofland
2026-03-15 23:41:12 +01:00
parent 46b5361ef7
commit 1aa5717891

View File

@ -138,6 +138,9 @@ fi
# 3. NETWORKING # 3. NETWORKING
echo "Configuring Networking..." echo "Configuring Networking..."
# Ensure radio is unblocked
rfkill unblock wlan || true
# hostapd # hostapd
cat <<EOF > /etc/hostapd/hostapd.conf cat <<EOF > /etc/hostapd/hostapd.conf
interface=wlan0 interface=wlan0
@ -166,6 +169,18 @@ if [ -f /etc/dhcpcd.conf ]; then
fi fi
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 # 4. DEPLOYMENT
echo "Deploying Application..." echo "Deploying Application..."
[ -d "$REAL_HOME/mpvj" ] && mv "$REAL_HOME/mpvj" "$REAL_HOME/mpvj.old.$(date +%s)" [ -d "$REAL_HOME/mpvj" ] && mv "$REAL_HOME/mpvj" "$REAL_HOME/mpvj.old.$(date +%s)"