From e8cdba85c48dcbbd42e6fcb5be3aa2912008cb84 Mon Sep 17 00:00:00 2001 From: Emil Renner Berthing Date: Tue, 7 Nov 2017 16:27:49 +0100 Subject: initial commit --- roles/space_server/templates/radius/clients.conf.j2 | 13 +++++++++++++ roles/space_server/templates/radius/getusers.sh.j2 | 10 ++++++++++ 2 files changed, 23 insertions(+) create mode 100644 roles/space_server/templates/radius/clients.conf.j2 create mode 100644 roles/space_server/templates/radius/getusers.sh.j2 (limited to 'roles/space_server/templates/radius') diff --git a/roles/space_server/templates/radius/clients.conf.j2 b/roles/space_server/templates/radius/clients.conf.j2 new file mode 100644 index 0000000..0e82666 --- /dev/null +++ b/roles/space_server/templates/radius/clients.conf.j2 @@ -0,0 +1,13 @@ +client ap1 { + ipaddr = 10.42.0.5 + netmask = 32 + secret = {{ radius_passwords.ap1 }} + nas_type = other +} + +client ap2 { + ipaddr = 10.42.0.6 + netmask = 32 + secret = {{ radius_passwords.ap2 }} + nas_type = other +} diff --git a/roles/space_server/templates/radius/getusers.sh.j2 b/roles/space_server/templates/radius/getusers.sh.j2 new file mode 100644 index 0000000..e77758b --- /dev/null +++ b/roles/space_server/templates/radius/getusers.sh.j2 @@ -0,0 +1,10 @@ +#!/bin/sh + +if curl -s -4 -k '{{ radius_passwords.download_url }}' -o /etc/raddb/users.new; then + if ! diff -q /etc/raddb/users /etc/raddb/users.new >/dev/null; then + mv -f /etc/raddb/users.new /etc/raddb/mods-config/files/authorize + systemctl restart radiusd.service + fi +else + rm -f /etc/raddb/users.new +fi -- cgit v1.2.1