mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Restart dnsmasq whenever iiab-lan-iface comes back up
This commit is contained in:
parent
0c85804e99
commit
afee35b222
2 changed files with 14 additions and 0 deletions
|
@ -14,6 +14,14 @@
|
|||
- { src: 'roles/network/templates/network/dnsmasq.service.u18', dest: '/etc/systemd/system/iiab-dnsmasq.service', mode: '0644' }
|
||||
- { src: 'roles/network/templates/network/dnsmasq-iiab', dest: '/etc/dnsmasq.d/dnsmasq-iiab', mode: '644' }
|
||||
|
||||
- name: Copy script to restart dnsmasq whenever br0 comes up
|
||||
template:
|
||||
src: "roles/network/templates/network/dnsmasq.sh.j2"
|
||||
dest: "/etc/networkd-dispatcher/routable.d/dnsmasq.sh"
|
||||
mode: "0755"
|
||||
owner: root
|
||||
group: root
|
||||
|
||||
- name: Don't use stock dnsmasq systemd unit file during boot
|
||||
systemd:
|
||||
name: dnsmasq
|
||||
|
|
6
roles/network/templates/network/dnsmasq.sh.j2
Executable file
6
roles/network/templates/network/dnsmasq.sh.j2
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ "$IFACE" == "{{ iiab_lan_iface }}" ];
|
||||
then
|
||||
/bin/systemctl restart dnsmasq.service
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue