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/hostapd/iiab-hotspot-off

45 lines
1.5 KiB
Text
Raw Normal View History

2017-11-19 00:48:13 +00:00
#!/bin/bash
{% if not network_enabled %}
echo -e "Networking role disabled\n"
echo -e "For details, see: https://github.com/iiab/iiab/pull/3302\n"
{% else %}
sed -i "s/^HOSTAPD_ENABLED.*/HOSTAPD_ENABLED=False/" {{ iiab_env_file }}
2020-05-06 15:14:25 +00:00
systemctl disable hostapd
systemctl stop hostapd
{% if wifi_up_down %}
systemctl disable iiab-clone-wifi.service
systemctl disable iiab-wifi-test.service
systemctl stop iiab-clone-wifi.service
2020-05-06 15:14:25 +00:00
echo " IIAB hotspot access point Disabled"
#exit 0
2020-05-06 15:14:25 +00:00
{% else %}
echo " IIAB hotspot access point Disabled"
2020-04-30 05:58:24 +00:00
{% if is_raspbian %}
# hotspot-off before ap0_updown
sed -i "s/^denyinterfaces/#denyinterfaces/" /etc/dhcpcd.conf
2019-02-26 19:03:02 +00:00
#systemctl disable dnsmasq
#systemctl stop dnsmasq
systemctl daemon-reload
systemctl restart dhcpcd
2019-06-15 19:16:56 +00:00
#systemctl restart networking 6/15/2019 TFM removed
# Temporary promiscuous-mode workaround for RPi's WiFi "10SEC disease"
2018-01-11 04:40:23 +00:00
# Set wlan0 to promiscuous when AP's OFF (for possible WiFi gateway)
# SEE ALSO iiab-hotspot-on + /usr/libexec/iiab-startup.sh
# https://github.com/iiab/iiab/issues/638#issuecomment-355455454
2020-04-13 09:33:38 +00:00
#if grep -qi raspbian /etc/*release; then
# ip link set dev wlan0 promisc on
#fi
2020-04-30 05:58:24 +00:00
{% else %}
#ubuntu (or Mint, or pure Debian?)
if [ -f /etc/NetworkManager/conf.d/wifi-manage.conf ]; then
sed -i "s|managed=0|managed=1|" /etc/NetworkManager/conf.d/wifi-manage.conf
2020-05-06 15:14:25 +00:00
fi
echo -e "\nIf you're enabling upstream WiFi, please reboot now.\n"
#exit 0
2020-04-30 05:58:24 +00:00
{% endif %}
2023-04-16 10:55:50 +00:00
#is_raspbian
{% endif %}
2023-04-16 10:55:50 +00:00
#wifi_up_down
{% endif %}
2023-04-16 10:55:50 +00:00
#network_enabled