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

update iiab-hotspot support files

This commit is contained in:
Jerry Vonau 2020-02-26 02:23:27 -06:00
parent 0bcf3c8184
commit 37da7407d4
3 changed files with 16 additions and 18 deletions

View file

@ -31,8 +31,8 @@ if [[ $(grep -i raspbian /etc/*release) &&
#) #)
#]]; #]];
then then
ip link set dev wlan0 promisc on # ip link set dev wlan0 promisc on
echo "wlan0 promiscuous mode ON, internal AP OFF: github.com/iiab/iiab/issues/638" echo "wlan0 promiscuous mode ON, internal AP OFF: github.com/iiab/iiab/issues/638 DISABLED"
fi fi
exit 0 exit 0

View file

@ -1,19 +1,19 @@
#!/bin/bash #!/bin/bash
sed -i -e "s/^denyinterfaces/#denyinterfaces/" /etc/dhcpcd.conf #sed -i -e "s/^denyinterfaces/#denyinterfaces/" /etc/dhcpcd.conf
systemctl disable hostapd systemctl disable hostapd
systemctl stop hostapd systemctl stop hostapd
#systemctl disable dnsmasq #systemctl disable dnsmasq
#systemctl stop dnsmasq #systemctl stop dnsmasq
systemctl daemon-reload #systemctl daemon-reload
systemctl restart dhcpcd #systemctl restart dhcpcd
#systemctl restart networking 6/15/2019 TFM removed #systemctl restart networking 6/15/2019 TFM removed
# Temporary promiscuous-mode workaround for RPi's WiFi "10SEC disease" # Temporary promiscuous-mode workaround for RPi's WiFi "10SEC disease"
# Set wlan0 to promiscuous when AP's OFF (for possible WiFi gateway) # Set wlan0 to promiscuous when AP's OFF (for possible WiFi gateway)
# SEE ALSO iiab-hotspot-on + /usr/libexec/iiab-startup.sh # SEE ALSO iiab-hotspot-on + /usr/libexec/iiab-startup.sh
# https://github.com/iiab/iiab/issues/638#issuecomment-355455454 # https://github.com/iiab/iiab/issues/638#issuecomment-355455454
if grep -qi raspbian /etc/*release; then #if grep -qi raspbian /etc/*release; then
ip link set dev wlan0 promisc on # ip link set dev wlan0 promisc on
fi #fi
sed -i -e "s/^HOSTAPD_ENABLED.*/HOSTAPD_ENABLED=False/" {{ iiab_env_file }} sed -i -e "s/^HOSTAPD_ENABLED.*/HOSTAPD_ENABLED=False/" {{ iiab_env_file }}

View file

@ -1,13 +1,11 @@
#!/bin/bash #!/bin/bash
cp -f /etc/hostapd/hostapd.conf.iiab /etc/hostapd/hostapd.conf #cp -f /etc/hostapd/hostapd.conf.iiab /etc/hostapd/hostapd.conf
sed -i -e "s/^#denyinterfaces/denyinterfaces/" /etc/dhcpcd.conf #sed -i -e "s/^#denyinterfaces/denyinterfaces/" /etc/dhcpcd.conf
# shut down wlan0 in case connected to network # shut down wlan0 in case connected to network
ip link set wlan0 down #ip link set wlan0 down
systemctl enable hostapd systemctl enable hostapd
#systemctl enable dnsmasq #systemctl daemon-reload
systemctl daemon-reload #systemctl restart dhcpcd
systemctl restart dhcpcd
#systemctl restart networking 6/15/2019 TFM removed
systemctl start hostapd systemctl start hostapd
systemctl start dnsmasq systemctl start dnsmasq
@ -15,9 +13,9 @@ systemctl start dnsmasq
# Disable "promiscuous" on wlan0 when AP (i.e. no WiFi gateway) # Disable "promiscuous" on wlan0 when AP (i.e. no WiFi gateway)
# SEE ALSO iiab-hotspot-off + /usr/libexec/iiab-startup.sh # SEE ALSO iiab-hotspot-off + /usr/libexec/iiab-startup.sh
# https://github.com/iiab/iiab/issues/638#issuecomment-355455454 # https://github.com/iiab/iiab/issues/638#issuecomment-355455454
if grep -qi raspbian /etc/*release; then #if grep -qi raspbian /etc/*release; then
ip link set dev wlan0 promisc off # ip link set dev wlan0 promisc off
fi #fi
sed -i -e "s/^HOSTAPD_ENABLED.*/HOSTAPD_ENABLED=True/" {{ iiab_env_file }} sed -i -e "s/^HOSTAPD_ENABLED.*/HOSTAPD_ENABLED=True/" {{ iiab_env_file }}