mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Merge branch 'iiab-hotspot-off_etc' of https://github.com/holta/iiab into asterisk-20--reg_dom2--iiab-hotspot-off_etc
This commit is contained in:
commit
73e123a357
2 changed files with 16 additions and 17 deletions
|
@ -3,7 +3,7 @@
|
||||||
echo -e "Networking role disabled\n"
|
echo -e "Networking role disabled\n"
|
||||||
echo -e "For details, see: https://github.com/iiab/iiab/pull/3302\n"
|
echo -e "For details, see: https://github.com/iiab/iiab/pull/3302\n"
|
||||||
{% else %}
|
{% else %}
|
||||||
sed -i -e "s/^HOSTAPD_ENABLED.*/HOSTAPD_ENABLED=False/" {{ iiab_env_file }}
|
sed -i "s/^HOSTAPD_ENABLED.*/HOSTAPD_ENABLED=False/" {{ iiab_env_file }}
|
||||||
systemctl disable hostapd
|
systemctl disable hostapd
|
||||||
systemctl stop hostapd
|
systemctl stop hostapd
|
||||||
{% if wifi_up_down %}
|
{% if wifi_up_down %}
|
||||||
|
@ -11,13 +11,12 @@ systemctl disable iiab-clone-wifi.service
|
||||||
systemctl disable iiab-wifi-test.service
|
systemctl disable iiab-wifi-test.service
|
||||||
systemctl stop iiab-clone-wifi.service
|
systemctl stop iiab-clone-wifi.service
|
||||||
echo " IIAB hotspot access point Disabled"
|
echo " IIAB hotspot access point Disabled"
|
||||||
exit 0
|
#exit 0
|
||||||
{% else %}
|
{% else %}
|
||||||
|
echo " IIAB hotspot access point Disabled"
|
||||||
{% if is_raspbian %}
|
{% if is_raspbian %}
|
||||||
# hotspot-off before ap0_updown
|
# hotspot-off before ap0_updown
|
||||||
sed -i -e "s/^denyinterfaces/#denyinterfaces/" /etc/dhcpcd.conf
|
sed -i "s/^denyinterfaces/#denyinterfaces/" /etc/dhcpcd.conf
|
||||||
systemctl disable hostapd
|
|
||||||
systemctl stop hostapd
|
|
||||||
#systemctl disable dnsmasq
|
#systemctl disable dnsmasq
|
||||||
#systemctl stop dnsmasq
|
#systemctl stop dnsmasq
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
@ -31,12 +30,12 @@ systemctl restart dhcpcd
|
||||||
# ip link set dev wlan0 promisc on
|
# ip link set dev wlan0 promisc on
|
||||||
#fi
|
#fi
|
||||||
{% else %}
|
{% else %}
|
||||||
#ubuntu
|
#ubuntu (or Mint, or pure Debian?)
|
||||||
if [ -f /etc/NetworkManager/conf.d/wifi-manage.conf ]; then
|
if [ -f /etc/NetworkManager/conf.d/wifi-manage.conf ]; then
|
||||||
sed -i -e "s|managed=0|managed=1|" /etc/NetworkManager/conf.d/wifi-manage.conf
|
sed -i "s|managed=0|managed=1|" /etc/NetworkManager/conf.d/wifi-manage.conf
|
||||||
fi
|
fi
|
||||||
echo -e "\nPlease reboot to enable upstream WiFi access.\n"
|
echo -e "\nIf you're enabling upstream WiFi, please reboot now.\n"
|
||||||
exit 0
|
#exit 0
|
||||||
{% endif %}
|
{% endif %}
|
||||||
#is_raspbian
|
#is_raspbian
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -9,18 +9,17 @@ echo -e "If you add Wi-Fi hardware, run 'cd /opt/iiab/iiab' then 'sudo ./iiab-ne
|
||||||
echo -e "For details, see: https://github.com/iiab/iiab/pull/3179\n"
|
echo -e "For details, see: https://github.com/iiab/iiab/pull/3179\n"
|
||||||
exit 1
|
exit 1
|
||||||
{% else %}
|
{% else %}
|
||||||
sed -i -e "s/^HOSTAPD_ENABLED.*/HOSTAPD_ENABLED=True/" {{ iiab_env_file }}
|
sed -i "s/^HOSTAPD_ENABLED.*/HOSTAPD_ENABLED=True/" {{ iiab_env_file }}
|
||||||
{% if wifi_up_down %}
|
{% if wifi_up_down %}
|
||||||
systemctl enable iiab-clone-wifi.service
|
systemctl enable iiab-clone-wifi.service
|
||||||
systemctl enable hostapd
|
systemctl enable hostapd
|
||||||
systemctl enable iiab-wifi-test.service
|
systemctl enable iiab-wifi-test.service
|
||||||
echo -e "\nPlease reboot to activate hostapd feature.\n"
|
#exit 0
|
||||||
exit 0
|
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if is_raspbian %}
|
{% if is_raspbian %}
|
||||||
# just do what we have always done in hotspot-on
|
# just do what we have always done in hotspot-on
|
||||||
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 "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
|
||||||
|
@ -38,13 +37,12 @@ systemctl start dnsmasq
|
||||||
# ip link set dev wlan0 promisc off
|
# ip link set dev wlan0 promisc off
|
||||||
#fi
|
#fi
|
||||||
{% else %}
|
{% else %}
|
||||||
#ubuntu
|
#ubuntu (or Mint, or pure Debian?)
|
||||||
if [ -f /etc/NetworkManager/conf.d/wifi-manage.conf ]; then
|
if [ -f /etc/NetworkManager/conf.d/wifi-manage.conf ]; then
|
||||||
sed -i -e "s|managed=1|managed=0|" /etc/NetworkManager/conf.d/wifi-manage.conf
|
sed -i "s|managed=1|managed=0|" /etc/NetworkManager/conf.d/wifi-manage.conf
|
||||||
fi
|
fi
|
||||||
systemctl enable hostapd
|
systemctl enable hostapd
|
||||||
echo -e "\nPlease reboot to activate hostapd feature.\n"
|
#exit 0
|
||||||
exit 0
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
#is_raspbian
|
#is_raspbian
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -53,3 +51,5 @@ exit 0
|
||||||
#can_be_ap
|
#can_be_ap
|
||||||
{% endif %}
|
{% endif %}
|
||||||
#network_enabled
|
#network_enabled
|
||||||
|
|
||||||
|
echo -e "\nPlease reboot to activate hostapd feature.\n"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue