2017-11-19 00:48:13 +00:00
|
|
|
#!/bin/bash
|
2017-11-24 18:18:23 +00:00
|
|
|
cp -f /etc/hostapd/hostapd.conf.iiab /etc/hostapd/hostapd.conf
|
2017-12-27 18:34:09 +00:00
|
|
|
sed -i -e "s/^#denyinterfaces/denyinterfaces/" /etc/dhcpcd.conf
|
2019-05-28 18:04:04 +00:00
|
|
|
# shut down wlan0 in case connected to network
|
|
|
|
ip link set wlan0 down
|
2017-11-19 00:48:13 +00:00
|
|
|
systemctl enable hostapd
|
2019-02-26 19:11:49 +00:00
|
|
|
#systemctl enable dnsmasq
|
2017-11-19 02:30:41 +00:00
|
|
|
systemctl daemon-reload
|
|
|
|
systemctl restart dhcpcd
|
2019-06-15 19:16:56 +00:00
|
|
|
#systemctl restart networking 6/15/2019 TFM removed
|
2017-11-19 02:30:41 +00:00
|
|
|
systemctl start hostapd
|
2019-01-02 06:04:41 +00:00
|
|
|
systemctl start dnsmasq
|
2018-01-11 04:41:18 +00:00
|
|
|
|
|
|
|
# Temporary promiscuous-mode workaround for RPi's WiFi "10SEC disease"
|
|
|
|
# Disable "promiscuous" on wlan0 when AP (i.e. no WiFi gateway)
|
|
|
|
# SEE ALSO iiab-hotspot-off + /usr/libexec/iiab-startup.sh
|
|
|
|
# https://github.com/iiab/iiab/issues/638#issuecomment-355455454
|
|
|
|
if grep -qi raspbian /etc/*release; then
|
|
|
|
ip link set dev wlan0 promisc off
|
|
|
|
fi
|
2018-01-11 04:47:32 +00:00
|
|
|
|
2018-10-15 10:41:58 +00:00
|
|
|
sed -i -e "s/^HOSTAPD_ENABLED.*/HOSTAPD_ENABLED=True/" {{ iiab_env_file }}
|
2018-04-04 06:36:26 +00:00
|
|
|
|
|
|
|
echo -e "\nPlease consider rebooting now.\n"
|