mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
24 lines
873 B
Bash
Executable file
24 lines
873 B
Bash
Executable file
#!/bin/bash
|
|
cp -f /etc/hostapd/hostapd.conf.iiab /etc/hostapd/hostapd.conf
|
|
sed -i -e "s/^#denyinterfaces/denyinterfaces/" /etc/dhcpcd.conf
|
|
# shut down wlan0 in case connected to network
|
|
ip link set wlan0 down
|
|
systemctl enable hostapd
|
|
#systemctl enable dnsmasq
|
|
systemctl daemon-reload
|
|
systemctl restart dhcpcd
|
|
#systemctl restart networking 6/15/2019 TFM removed
|
|
systemctl start hostapd
|
|
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
|
|
|
|
sed -i -e "s/^HOSTAPD_ENABLED.*/HOSTAPD_ENABLED=True/" {{ iiab_env_file }}
|
|
|
|
echo -e "\nPlease consider rebooting now.\n"
|