summaryrefslogtreecommitdiff
path: root/data/templates/accel-ppp
diff options
context:
space:
mode:
Diffstat (limited to 'data/templates/accel-ppp')
-rw-r--r--data/templates/accel-ppp/chap-secrets.ipoe.tmpl26
-rw-r--r--data/templates/accel-ppp/config_chap_secrets_radius.j22
-rw-r--r--data/templates/accel-ppp/ipoe.config.tmpl24
-rw-r--r--data/templates/accel-ppp/l2tp.config.tmpl28
-rw-r--r--data/templates/accel-ppp/pppoe.config.tmpl2
-rw-r--r--data/templates/accel-ppp/pptp.config.tmpl18
6 files changed, 50 insertions, 50 deletions
diff --git a/data/templates/accel-ppp/chap-secrets.ipoe.tmpl b/data/templates/accel-ppp/chap-secrets.ipoe.tmpl
index a7d899354..1df878fcf 100644
--- a/data/templates/accel-ppp/chap-secrets.ipoe.tmpl
+++ b/data/templates/accel-ppp/chap-secrets.ipoe.tmpl
@@ -1,18 +1,18 @@
# username server password acceptable local IP addresses shaper
-{% for interface in auth_interfaces -%}
-{% for mac in interface.mac -%}
-{% if mac.rate_upload and mac.rate_download -%}
-{% if mac.vlan_id -%}
+{% for interface in auth_interfaces %}
+{% for mac in interface.mac %}
+{% if mac.rate_upload and mac.rate_download %}
+{% if mac.vlan_id %}
{{ interface.name }}.{{ mac.vlan_id }} * {{ mac.address | lower }} * {{ mac.rate_download }}/{{ mac.rate_upload }}
-{% else -%}
+{% else %}
{{ interface.name }} * {{ mac.address | lower }} * {{ mac.rate_download }}/{{ mac.rate_upload }}
-{% endif -%}
-{% else -%}
-{% if mac.vlan_id -%}
+{% endif %}
+{% else %}
+{% if mac.vlan_id %}
{{ interface.name }}.{{ mac.vlan_id }} * {{ mac.address | lower }} *
-{% else -%}
+{% else %}
{{ interface.name }} * {{ mac.address | lower }} *
-{% endif -%}
-{% endif -%}
-{% endfor -%}
-{% endfor -%}
+{% endif %}
+{% endif %}
+{% endfor %}
+{% endfor %}
diff --git a/data/templates/accel-ppp/config_chap_secrets_radius.j2 b/data/templates/accel-ppp/config_chap_secrets_radius.j2
index c94e75a23..52d5d40e7 100644
--- a/data/templates/accel-ppp/config_chap_secrets_radius.j2
+++ b/data/templates/accel-ppp/config_chap_secrets_radius.j2
@@ -27,7 +27,7 @@ called-sid={{ authentication.radius.called_sid_format }}
{% endif %}
{% if authentication.radius.dynamic_author.server is defined and authentication.radius.dynamic_author.server is not none %}
dae-server={{ authentication.radius.dynamic_author.server }}:{{ authentication.radius.dynamic_author.port }},{{ authentication.radius.dynamic_author.key }}
-{% endif -%}
+{% endif %}
{% endif %}
{# Both chap-secrets and radius block required the gw-ip-address #}
{% if gateway_address is defined and gateway_address is not none %}
diff --git a/data/templates/accel-ppp/ipoe.config.tmpl b/data/templates/accel-ppp/ipoe.config.tmpl
index ab61f7f5a..1cf2ab0be 100644
--- a/data/templates/accel-ppp/ipoe.config.tmpl
+++ b/data/templates/accel-ppp/ipoe.config.tmpl
@@ -35,7 +35,7 @@ password=csid
{% endif %}
proxy-arp=1
-{%- for interface in interfaces %}
+{% for interface in interfaces %}
{% if (interface.shared == '0') and (interface.vlan_mon) %}
vlan-mon={{ interface.name }},{{ interface.vlan_mon | join(',') }}
{% endif %}
@@ -43,16 +43,16 @@ vlan-mon={{ interface.name }},{{ interface.vlan_mon | join(',') }}
{% if dnsv4 %}
[dns]
-{% for dns in dnsv4 -%}
+{% for dns in dnsv4 %}
dns{{ loop.index }}={{ dns }}
-{% endfor -%}
+{% endfor %}
{% endif %}
{% if dnsv6 %}
[ipv6-dns]
-{% for dns in dnsv6 -%}
+{% for dns in dnsv6 %}
{{ dns }}
-{% endfor -%}
+{% endfor %}
{% endif %}
[ipv6-nd]
@@ -79,7 +79,7 @@ chap-secrets={{ chap_secrets_file }}
verbose=1
{% for r in radius_server %}
server={{ r.server }},{{ r.key }},auth-port={{ r.port }},acct-port={{ r.acct_port }},req-limit=0,fail-time={{ r.fail_time }}
-{% endfor -%}
+{% endfor %}
{% if radius_acct_inter_jitter %}
acct-interim-jitter={{ radius_acct_inter_jitter }}
@@ -90,17 +90,17 @@ timeout={{ radius_timeout }}
max-try={{ radius_max_try }}
{% if radius_nas_id %}
nas-identifier={{ radius_nas_id }}
-{% endif -%}
+{% endif %}
{% if radius_nas_ip %}
nas-ip-address={{ radius_nas_ip }}
-{% endif -%}
+{% endif %}
{% if radius_source_address %}
bind={{ radius_source_address }}
-{% endif -%}
+{% endif %}
{% if radius_dynamic_author %}
dae-server={{ radius_dynamic_author.server }}:{{ radius_dynamic_author.port }},{{ radius_dynamic_author.key }}
-{% endif -%}
+{% endif %}
{% if radius_shaper_attr %}
[shaper]
@@ -108,8 +108,8 @@ verbose=1
attr={{ radius_shaper_attr }}
{% if radius_shaper_vendor %}
vendor={{ radius_shaper_vendor }}
-{% endif -%}
-{% endif -%}
+{% endif %}
+{% endif %}
{% endif %}
[cli]
diff --git a/data/templates/accel-ppp/l2tp.config.tmpl b/data/templates/accel-ppp/l2tp.config.tmpl
index 9a3c27912..070a966b7 100644
--- a/data/templates/accel-ppp/l2tp.config.tmpl
+++ b/data/templates/accel-ppp/l2tp.config.tmpl
@@ -9,7 +9,7 @@ chap-secrets
{% if auth_mode == 'radius' %}
radius
-{% endif -%}
+{% endif %}
ippool
shaper
@@ -27,23 +27,23 @@ level=5
{% if dnsv4 %}
[dns]
-{% for dns in dnsv4 -%}
+{% for dns in dnsv4 %}
dns{{ loop.index }}={{ dns }}
-{% endfor -%}
+{% endfor %}
{% endif %}
{% if dnsv6 %}
[ipv6-dns]
-{% for dns in dnsv6 -%}
+{% for dns in dnsv6 %}
{{ dns }}
-{% endfor -%}
+{% endfor %}
{% endif %}
{% if wins %}
[wins]
-{% for server in wins -%}
+{% for server in wins %}
wins{{ loop.index }}={{ server }}
-{% endfor -%}
+{% endfor %}
{% endif %}
[l2tp]
@@ -65,11 +65,11 @@ secret={{ lns_shared_secret }}
[ip-pool]
{% if client_ip_pool %}
{{ client_ip_pool }}
-{% endif -%}
+{% endif %}
{% if client_ip_subnets %}
{% for sn in client_ip_subnets %}
{{sn}}
-{% endfor -%}
+{% endfor %}
{% endif %}
{% endif %}
{% if gateway_address %}
@@ -84,7 +84,7 @@ chap-secrets={{ chap_secrets_file }}
verbose=1
{% for r in radius_server %}
server={{ r.server }},{{ r.key }},auth-port={{ r.port }},acct-port={{ r.acct_port }},req-limit=0,fail-time={{ r.fail_time }}
-{% endfor -%}
+{% endfor %}
{% if radius_acct_inter_jitter %}
acct-interim-jitter={{ radius_acct_inter_jitter }}
@@ -96,13 +96,13 @@ max-try={{ radius_max_try }}
{% if radius_nas_id %}
nas-identifier={{ radius_nas_id }}
-{% endif -%}
+{% endif %}
{% if radius_nas_ip %}
nas-ip-address={{ radius_nas_ip }}
-{% endif -%}
+{% endif %}
{% if radius_source_address %}
bind={{ radius_source_address }}
-{% endif -%}
+{% endif %}
{% endif %}
{% if gateway_address %}
gw-ip-address={{ gateway_address }}
@@ -144,7 +144,7 @@ verbose=1
attr={{ radius_shaper_attr }}
{% if radius_shaper_vendor %}
vendor={{ radius_shaper_vendor }}
-{% endif -%}
+{% endif %}
{% endif %}
[cli]
diff --git a/data/templates/accel-ppp/pppoe.config.tmpl b/data/templates/accel-ppp/pppoe.config.tmpl
index 19adbc890..1d6c1fefc 100644
--- a/data/templates/accel-ppp/pppoe.config.tmpl
+++ b/data/templates/accel-ppp/pppoe.config.tmpl
@@ -108,7 +108,7 @@ interface=re:{{ interface.name }}\.\d+
{% if service_name %}
service-name={{ service_name | join(',') }}
-{% endif -%}
+{% endif %}
{% if pado_delay %}
pado-delay={{ pado_delay }}
diff --git a/data/templates/accel-ppp/pptp.config.tmpl b/data/templates/accel-ppp/pptp.config.tmpl
index dc77b42e9..5a6cfe749 100644
--- a/data/templates/accel-ppp/pptp.config.tmpl
+++ b/data/templates/accel-ppp/pptp.config.tmpl
@@ -7,7 +7,7 @@ ippool
chap-secrets
{% elif auth_mode == 'radius' %}
radius
-{% endif -%}
+{% endif %}
{% for proto in auth_proto %}
{{proto}}
{% endfor %}
@@ -22,16 +22,16 @@ level=5
{% if dnsv4 %}
[dns]
-{% for dns in dnsv4 -%}
+{% for dns in dnsv4 %}
dns{{ loop.index }}={{ dns }}
-{% endfor -%}
+{% endfor %}
{% endif %}
{% if wins %}
[wins]
-{% for server in wins -%}
+{% for server in wins %}
wins{{ loop.index }}={{ server }}
-{% endfor -%}
+{% endfor %}
{% endif %}
@@ -67,7 +67,7 @@ chap-secrets={{ chap_secrets_file }}
verbose=1
{% for r in radius_server %}
server={{ r.server }},{{ r.key }},auth-port={{ r.port }},acct-port={{ r.acct_port }},req-limit=0,fail-time={{ r.fail_time }}
-{% endfor -%}
+{% endfor %}
{% if radius_acct_inter_jitter %}
acct-interim-jitter={{ radius_acct_inter_jitter }}
@@ -79,13 +79,13 @@ max-try={{ radius_max_try }}
{% if radius_nas_id %}
nas-identifier={{ radius_nas_id }}
-{% endif -%}
+{% endif %}
{% if radius_nas_ip %}
nas-ip-address={{ radius_nas_ip }}
-{% endif -%}
+{% endif %}
{% if radius_source_address %}
bind={{ radius_source_address }}
-{% endif -%}
+{% endif %}
{% endif %}
[cli]