Skip to content
Snippets Groups Projects
Commit d2885da1 authored by Nathan Ward's avatar Nathan Ward
Browse files

Update client.conf and realm templates to not have stray empty lines

parent 0aed640e
No related branches found
No related tags found
No related merge requests found
client <%= @shortname %> { client <%= @shortname %> {
<% if @ip %>ipaddr = <%= @ip %><% end %> <%- if defined?(@ip) -%>
<% if @ip6 %>ipv6addr = <%= @ip6 %><% end %> ipaddr = <%= @ip %>
<% if @proto %>proto = <%= @proto %><% end %> <%- end -%>
<%- if defined?(@ip6) -%>
ipv6addr = <%= @ip6 %>
<%- end -%>
<%- if defined?(@proto) -%>
proto = <%= @proto %>
<%- end -%>
shortname = <%= @shortname %> shortname = <%= @shortname %>
secret = "<%= @secret %>" secret = "<%= @secret %>"
<% if @virtual_server %>virtual_server = <%= @virtual_server %><% end %> <%- if defined?(@virtual_server) -%>
<% if @nastype %>nas_type = <%= @nastype %><% end %> virtual_server = <%= @virtual_server %>
<% if @require_message_authenticator %>require_message_authenticator = <%= @require_message_authenticator %><% end %> <%- end -%>
<% if @login %>login = <%= @login %><% end %> <%- if defined?(@nastype) -%>
<% if @password %>password = <%= @password %><% end %> nas_type = <%= @nastype %>
<% if @coa_server %>coa_server = <%= @coa_server %><% end %> <%- end -%>
<% if @response_window %>response_window = <%= @response_window %><% end %> <%- if defined?(@require_message_authenticator) -%>
<%- if @lifetime or @idle_timeout or @max_connections -%> require_message_authenticator = <%= @require_message_authenticator %>
<%- end -%>
<%- if defined?(@login) -%>
login = <%= @login %>
<%- end -%>
<%- if defined?(@password) -%>
password = <%= @password %>
<%- end -%>
<%- if defined?(@coa_server) -%>
coa_server = <%= @coa_server %>
<%- end -%>
<%- if defined?(@response_window) -%>
response_window = <%= @response_window %>
<%- end -%>
<%- if defined?(@lifetime) or @idle_timeout or @max_connections -%>
limit { limit {
<% if @max_connections %>max_connections = <%= @max_connections %><% end %> <%- if defined?(@max_connections) -%>
<% if @lifetime %>lifetime = <%= @lifetime %><% end %> max_connections = <%= @max_connections %>
<% if @idle_timeout %>idle_timeout = <%= @idle_timeout %><% end %> <%- end -%>
<%- if defined?(@lifetime) -%>
lifetime = <%= @lifetime -%>
<%- end -%>
<%- if defined?(@idle_timeout) -%>
idle_timeout = <%= @idle_timeout %>
<%- end -%>
} }
<%- end -%> <%- end -%>
<%- if @attributes and !@attributes.empty? -%> <%- if defined?(@attributes) and !@attributes.empty? -%>
<%- if @attributes.respond_to?('join') -%> <%- if defined?(@attributes).respond_to?('join') -%>
<%= @attributes.join("\n ") %> <%= @attributes.join("\n ") %>
<%- elsif @attributes.is_a?(Hash) -%> <%- elsif defined?(@attributes).is_a?(Hash) -%>
<%- @attributes.sort.each do |k, v| -%> <%- @attributes.sort.each do |k, v| -%>
<%= k %> = <%= v %> <%= k %> = <%= v %>
<%- end -%> <%- end -%>
<%- elsif @attributes -%> <%- elsif defined?(@attributes) -%>
<%= @attributes %> <%= @attributes %>
<%- end -%> <%- end -%>
<%- end -%> <%- end -%>
......
...@@ -10,9 +10,8 @@ realm <%= @name %> { ...@@ -10,9 +10,8 @@ realm <%= @name %> {
<% end -%> <% end -%>
<% if defined?(@pool) -%> <% if defined?(@pool) -%>
pool = <%= @pool %> pool = <%= @pool %>
<% end %> <% end -%>
<% if @nostrip -%> <% if @nostrip -%>
nostrip nostrip
<% end -%> <% end -%>
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment