1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-12 19:22:24 +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:
root 2023-04-24 11:43:01 +01:00
commit 73e123a357
2 changed files with 16 additions and 17 deletions

View file

@ -3,7 +3,7 @@
echo -e "Networking role disabled\n"
echo -e "For details, see: https://github.com/iiab/iiab/pull/3302\n"
{% 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 stop hostapd
{% if wifi_up_down %}
@ -11,13 +11,12 @@ systemctl disable iiab-clone-wifi.service
systemctl disable iiab-wifi-test.service
systemctl stop iiab-clone-wifi.service
echo " IIAB hotspot access point Disabled"
exit 0
#exit 0
{% else %}
echo " IIAB hotspot access point Disabled"
{% if is_raspbian %}
# hotspot-off before ap0_updown
sed -i -e "s/^denyinterfaces/#denyinterfaces/" /etc/dhcpcd.conf
systemctl disable hostapd
systemctl stop hostapd
sed -i "s/^denyinterfaces/#denyinterfaces/" /etc/dhcpcd.conf
#systemctl disable dnsmasq
#systemctl stop dnsmasq
systemctl daemon-reload
@ -31,12 +30,12 @@ systemctl restart dhcpcd
# ip link set dev wlan0 promisc on
#fi
{% else %}
#ubuntu
#ubuntu (or Mint, or pure Debian?)
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
echo -e "\nPlease reboot to enable upstream WiFi access.\n"
exit 0
echo -e "\nIf you're enabling upstream WiFi, please reboot now.\n"
#exit 0
{% endif %}
#is_raspbian
{% endif %}

View file

@ -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"
exit 1
{% 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 %}
systemctl enable iiab-clone-wifi.service
systemctl enable hostapd
systemctl enable iiab-wifi-test.service
echo -e "\nPlease reboot to activate hostapd feature.\n"
exit 0
#exit 0
{% else %}
{% if is_raspbian %}
# just do what we have always done in hotspot-on
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
ip link set wlan0 down
systemctl enable hostapd
@ -38,13 +37,12 @@ systemctl start dnsmasq
# ip link set dev wlan0 promisc off
#fi
{% else %}
#ubuntu
#ubuntu (or Mint, or pure Debian?)
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
systemctl enable hostapd
echo -e "\nPlease reboot to activate hostapd feature.\n"
exit 0
#exit 0
{% endif %}
#is_raspbian
{% endif %}
@ -53,3 +51,5 @@ exit 0
#can_be_ap
{% endif %}
#network_enabled
echo -e "\nPlease reboot to activate hostapd feature.\n"