forget_wifi: scan WiFi avant hotspot pour remplir wifi_list.csv
Sans ce scan, le CSV est vide/perime et la page WiFi en hotspot ne peut pas afficher les reseaux disponibles. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -33,6 +33,12 @@ fi
|
|||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
|
# Scan WiFi networks BEFORE starting hotspot (scan impossible once hotspot is active)
|
||||||
|
OUTPUT_FILE="/var/www/nebuleair_pro_4g/wifi_list.csv"
|
||||||
|
echo "Scanning WiFi networks..."
|
||||||
|
nmcli -f SSID,SIGNAL,SECURITY device wifi list | awk 'BEGIN { OFS=","; print "SSID,SIGNAL,SECURITY" } NR>1 { print $1,$2,$3 }' > "$OUTPUT_FILE"
|
||||||
|
echo "WiFi scan saved to $OUTPUT_FILE"
|
||||||
|
|
||||||
# Start hotspot
|
# Start hotspot
|
||||||
echo "Starting hotspot with SSID: $DEVICE_NAME"
|
echo "Starting hotspot with SSID: $DEVICE_NAME"
|
||||||
sudo nmcli device wifi hotspot ifname wlan0 ssid "$DEVICE_NAME" password nebuleaircfg
|
sudo nmcli device wifi hotspot ifname wlan0 ssid "$DEVICE_NAME" password nebuleaircfg
|
||||||
|
|||||||
Reference in New Issue
Block a user