mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Avoid restarting hostapd if manually_toggle_AP
This commit is contained in:
parent
4dc6643d47
commit
3d5d5ac039
1 changed files with 30 additions and 20 deletions
|
@ -3,44 +3,52 @@
|
|||
# when: iiab_wireless_lan_iface is defined and hostapd_enabled
|
||||
|
||||
- name: Start named service
|
||||
service: name={{ dns_service }}
|
||||
state=restarted
|
||||
service:
|
||||
name: "{{ dns_service }}"
|
||||
state: restarted
|
||||
when: named_enabled and named_install
|
||||
|
||||
- name: Stop Squid service
|
||||
service: name={{ proxy }}
|
||||
state=stopped
|
||||
service:
|
||||
name: "{{ proxy }}"
|
||||
state: stopped
|
||||
async: 120
|
||||
when: squid_install
|
||||
|
||||
- name: Stop DansGuardian
|
||||
service: name=dansguardian
|
||||
state=stopped
|
||||
service:
|
||||
name: dansguardian
|
||||
state: stopped
|
||||
when: dansguardian_install
|
||||
|
||||
- name: Restart DansGuardian - except Ubuntu which needs reboot to activate
|
||||
service: name=dansguardian
|
||||
state=restarted
|
||||
service:
|
||||
name: dansguardian
|
||||
state: restarted
|
||||
when: dansguardian_enabled and dansguardian_install and ( not is_ubuntu and iiab_stage|int < 4 )
|
||||
|
||||
# Squid get re-loaded with dispatcher.d
|
||||
- name: Restart Squid service
|
||||
service: name={{ proxy }}
|
||||
state=restarted
|
||||
service:
|
||||
name: "{{ proxy }}"
|
||||
state: restarted
|
||||
when: squid_enabled and squid_install
|
||||
|
||||
- name: Restart Wondershaper service
|
||||
service: name=wondershaper
|
||||
state=restarted
|
||||
service:
|
||||
name: wondershaper
|
||||
state: restarted
|
||||
when: wondershaper_enabled
|
||||
|
||||
- name: Restart avahi service
|
||||
service: name=avahi-daemon
|
||||
state=restarted
|
||||
service:
|
||||
name: avahi-daemon
|
||||
state: restarted
|
||||
|
||||
- name: Create gateway flag
|
||||
shell: echo 1 > /etc/sysconfig/olpc-scripts/setup.d/installed/gateway
|
||||
creates=/etc/sysconfig/olpc-scripts/setup.d/installed/gateway
|
||||
args:
|
||||
creates: /etc/sysconfig/olpc-scripts/setup.d/installed/gateway
|
||||
when: iiab_network_mode == "Gateway"
|
||||
|
||||
- name: Waiting {{ hostapd_wait }} seconds for network to stabilize
|
||||
|
@ -55,11 +63,13 @@
|
|||
register: wifi_slave
|
||||
|
||||
- name: Restart hostapd if WiFi slave is inactive
|
||||
service: name=hostapd.service
|
||||
state=restarted
|
||||
when: wifi_slave.stdout is defined and hostapd_enabled and wifi_slave.stdout == 0
|
||||
service:
|
||||
name: hostapd.service
|
||||
state: restarted
|
||||
when: hostapd_enabled and not manually_toggle_AP and wifi_slave.stdout is defined and wifi_slave.stdout == 0
|
||||
|
||||
- name: dhcp_server may be affected - starting - user choice
|
||||
service: name={{ dhcp_service2 }}
|
||||
state=restarted
|
||||
service:
|
||||
name: "{{ dhcp_service2 }}"
|
||||
state: restarted
|
||||
when: iiab_network_mode != "Appliance"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue