1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-15 04:32:11 +00:00
iiab/roles/network/templates/network/iiab-hotspot-on

25 lines
873 B
Text
Raw Normal View History

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
# 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
systemctl daemon-reload
systemctl restart dhcpcd
2019-06-15 19:16:56 +00:00
#systemctl restart networking 6/15/2019 TFM removed
systemctl start hostapd
2019-01-02 06:04:41 +00:00
systemctl start dnsmasq
# 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
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"