salt-states/wifi-voucher/service.sls

32 lines
798 B
Plaintext
Raw Permalink Normal View History

2023-06-27 07:16:37 +00:00
WIFI-Voucher Unit environment file:
file.managed:
- name: /etc/default/wifi-voucher
- source: salt://wifi-voucher/files/voucher.env.jinja
- template: jinja
- user: root
- group: voucher
- mode: "0640"
WIFI-Voucher unit service file:
file.managed:
- name: /etc/systemd/system/wifi-voucher.service
- source: salt://wifi-voucher/files/wifi-voucher.service
- user: root
- group: root
- mode: "0644"
SystemD Reload:
cmd.run:
- name: systemctl --system daemon-reload
- onchanges:
- file: WIFI-Voucher unit service file
Start wifi-voucher:
service.running:
- name: wifi-voucher
- enable: True
- watch:
- file: WIFI-Voucher Unit environment file
- file: WIFI-Voucher unit service file
- cmd: SystemD Reload