mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
don't clobber later revisions to hostapd.service.j2
This commit is contained in:
parent
ca8e9ab79a
commit
04c876b28a
2 changed files with 23 additions and 2 deletions
|
@ -39,14 +39,23 @@
|
|||
set_fact:
|
||||
ap0_mac_addr: "{{ ap0_mac.stdout }}"
|
||||
|
||||
- name: Use custom systemd unit file to start 'hostapd' service
|
||||
- name: Use custom 'hostapd' systemd service unit file using ap0 when wifi_up_down
|
||||
template:
|
||||
src: hostapd/hostapd.service.j2
|
||||
dest: /etc/systemd/system/hostapd.service
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
when: discovered_wireless_iface != "none"
|
||||
when: discovered_wireless_iface != "none" and wifi_up_down
|
||||
|
||||
- name: Use custom 'hostapd' systemd service unit file for {{ discovered_wireless_iface }} when not wifi_up_down
|
||||
template:
|
||||
src: hostapd/hostapd.legacy.j2
|
||||
dest: /etc/systemd/system/hostapd.service
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
when: discovered_wireless_iface != "none" and not wifi_up_down
|
||||
|
||||
- name: Create /usr/bin/iiab-hotspot-on from template
|
||||
template:
|
||||
|
|
12
roles/network/templates/hostapd/hostapd.legacy.j2
Normal file
12
roles/network/templates/hostapd/hostapd.legacy.j2
Normal file
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
|
||||
Before=network.target
|
||||
Wants=network-pre.target
|
||||
|
||||
[Service]
|
||||
Type=idle
|
||||
PIDFile=/run/hostapd.pid
|
||||
ExecStart=/usr/sbin/hostapd -P /run/hostapd.pid /etc/hostapd/hostapd.conf
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in a new issue