From c6a21403299bb35b7e41ee9c6fbb2d448921656b Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Wed, 22 Apr 2020 08:45:48 -0500 Subject: [PATCH] edit hostapd on the fly --- roles/network/templates/hostapd/test-wifi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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