1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-14 12:12:12 +00:00

Merge pull request #3886 from jvonau/HT-new2

dont start hostapd when no_net_restart is True
This commit is contained in:
A Holt 2025-01-13 22:20:39 -05:00 committed by GitHub
commit d3730b9494
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -28,12 +28,12 @@
state: restarted
when: wifi_up_down and can_be_ap and ansible_ap0 is undefined
- name: Restart hostapd when WiFi is present but not when using WiFi as gateway with wifi_up_down False
- name: Restart hostapd when WiFi is present but not when using WiFi as gateway
systemd:
name: hostapd
state: restarted
daemon_reload: yes
when: hostapd_enabled and (wifi_up_down or not no_net_restart)
when: hostapd_enabled and not no_net_restart
# 2022-07-22: @jvonau suggests commenting this out as: "we really don't touch
# any of the config files... netplan.yml renames one file if it's a container
@ -107,7 +107,7 @@
systemd:
name: hostapd
state: restarted
when: hostapd_enabled and wifi_slave.stdout is defined and wifi_slave.stdout == 0
when: hostapd_enabled and not no_net_restart and wifi_slave.stdout is defined and wifi_slave.stdout == 0
#both interfaces.d and systemd-networkd should have br0 available and Appliance lacks br0
#keep an eye on legacy wifi installs where br0 is present but not 'online' with an ip address