diff --git a/roles/network/templates/hostapd/test-wifi b/roles/network/templates/hostapd/test-wifi index 8cbc8e01c..6565efcf7 100755 --- a/roles/network/templates/hostapd/test-wifi +++ b/roles/network/templates/hostapd/test-wifi @@ -20,4 +20,6 @@ FREQ=`wpa_cli -i wlan0 scan_results | grep $SSID | awk '{print $2}'` echo "frequency is $FREQ for $SSID" CHAN=$(((($FREQ - 2407)) / 5 )) echo "channel is $CHAN for $SSID" - +cp /etc/hostapd/hostapd.conf.iiab /etc/hostapd/hostapd.conf +sed -i -e "s/^channel.*/channel=$CHAN/" /etc/hostapd/hostapd.conf +systemctl reload-daemon