diff options
Diffstat (limited to 'roles/space_server/templates/radius')
-rw-r--r-- | roles/space_server/templates/radius/clients.conf.j2 | 13 | ||||
-rw-r--r-- | roles/space_server/templates/radius/getusers.sh.j2 | 10 |
2 files changed, 23 insertions, 0 deletions
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 |