diff --git a/roles/network/tasks/hostapd.yml b/roles/network/tasks/hostapd.yml index 5d35b6855..20e78d521 100644 --- a/roles/network/tasks/hostapd.yml +++ b/roles/network/tasks/hostapd.yml @@ -26,6 +26,20 @@ group=root mode=0644 +- name: Use custom iiab-hotspot-on + template: src=network/iiab-hotspot-on + dest=/usr/bin/iiab-hotspot-on + owner=root + group=root + mode=0755 + +- name: Use custom iiab-hotspot-off + template: src=network/iiab-hotspot-off + dest=/usr/bin/iiab-hotspot-off + owner=root + group=root + mode=0755 + - name: Enable the Access Point 'hostapd' service service: enabled=yes name=hostapd.service diff --git a/roles/network/templates/network/iiab-hotspot-off b/roles/network/templates/network/iiab-hotspot-off new file mode 100755 index 000000000..f7b718ee6 --- /dev/null +++ b/roles/network/templates/network/iiab-hotspot-off @@ -0,0 +1,3 @@ +#!/bin/bash +sed -i -e "s/^denyinterfaces*/#denyinterfaces/" /etc/dhcpcd.conf +systemctl disable hostapd diff --git a/roles/network/templates/network/iiab-hotspot-on b/roles/network/templates/network/iiab-hotspot-on new file mode 100755 index 000000000..2c7859a9d --- /dev/null +++ b/roles/network/templates/network/iiab-hotspot-on @@ -0,0 +1,3 @@ +#!/bin/bash +sed -i -e "s/#denyinterfaces*/denyinterfaces/" /etc/dhcpcd.conf +systemctl enable hostapd