parent
26c92664fd
commit
d39b2edb17
11
salt/states/hostapd/files/hostapd.service.jinja
Normal file
11
salt/states/hostapd/files/hostapd.service.jinja
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
|
||||||
|
BindsTo=sys-subsystem-net-devices-{{ pillar['network']['wireless'] }}.device
|
||||||
|
After=sys-subsystem-net-devices-{{ pillar['network']['wireless'] }}.device
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/sbin/hostapd /etc/hostapd.conf
|
||||||
|
ExecReload=/bin/kill -HUP $MAINPID
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
@ -28,6 +28,21 @@ Configure hostapd:
|
|||||||
- group: root
|
- group: root
|
||||||
- mode: "0600"
|
- mode: "0600"
|
||||||
|
|
||||||
|
Create hostapd service unit file:
|
||||||
|
file.managed:
|
||||||
|
- name: /etc/systemd/system/hostapd.service
|
||||||
|
- source: salt://hostapd/files/hostapd.service.jinja
|
||||||
|
- template: jinja
|
||||||
|
- user: root
|
||||||
|
- group: root
|
||||||
|
- mode: "0644"
|
||||||
|
|
||||||
|
Reload systemd daemon:
|
||||||
|
cmd.run:
|
||||||
|
- name: systemctl daemon-reload
|
||||||
|
- onchanges:
|
||||||
|
- file: Create hostapd service unit file
|
||||||
|
|
||||||
Start hostapd:
|
Start hostapd:
|
||||||
service.running:
|
service.running:
|
||||||
- name: hostapd
|
- name: hostapd
|
||||||
|
Loading…
Reference in New Issue
Block a user