From efa472c8fe41281852e5383301f0931cc5e6fd27 Mon Sep 17 00:00:00 2001 From: Lars Beckers <lars.beckers@rwth-aachen.de> Date: Fri, 18 Jan 2019 18:25:16 +0100 Subject: [PATCH] uwsgi-python: update isic config file --- php-fpm/templates/pool.conf.j2 | 4 ++-- uwsgi-python/templates/apps/isic.j2 | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/php-fpm/templates/pool.conf.j2 b/php-fpm/templates/pool.conf.j2 index 23c5f02..05468ff 100644 --- a/php-fpm/templates/pool.conf.j2 +++ b/php-fpm/templates/pool.conf.j2 @@ -17,12 +17,12 @@ pm.max_requests = 500 {% if item.params is defined and item.params %} {% for key, value in item.params.items() %} -php_admin_value[{{key}}] = {{value}}; +php_admin_value[{{key}}] = {{value}} {% endfor %} {% endif %} {% if item.flags is defined and item.flags %} {% for key, value in item.flags.items() %} -php_admin_flag[{{key}}] = {{'on' if value else 'off'}}; +php_admin_flag[{{key}}] = {{'on' if value else 'off'}} {% endfor %} {% endif %} diff --git a/uwsgi-python/templates/apps/isic.j2 b/uwsgi-python/templates/apps/isic.j2 index fb71a7b..e14ea59 100644 --- a/uwsgi-python/templates/apps/isic.j2 +++ b/uwsgi-python/templates/apps/isic.j2 @@ -16,7 +16,13 @@ AD_USER_DN = '{{ isic_ad_user_dn }}' AD_GROUP_DN = '{{ isic_ad_group_dn }}' AD_CA_CERT = '{{ isic_ad_ca_cert }}' AD_AUTH_GROUP = '{{ isic_ad_auth_group }}' +{% if isic_allowed_networks %} +ALLOWED_NETWORKS = ['{{ isic_allowed_networks|join("', '") }}'] +{% else %} +ALLOWED_NETWORKS = [] +{% endif %} +import socket USE_EXTERNAL_COMMAND = {{ isic_use_external_command }} -PRINTER_HOST = '{{ isic_printer_host }}' +PRINTER_HOST = socket.gethostbyname('{{ isic_printer_host }}') PRINTER_PORT = {{ isic_printer_port }} -- GitLab