1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

edit hostapd on the fly

This commit is contained in:
Jerry Vonau 2020-04-22 08:45:48 -05:00
parent e125537c0c
commit c6a2140329

View file

@ -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