client.conf.erb 1.25 KB
Newer Older
1
client <%= @shortname %> {
2
3
	<% if @ip %>ipaddr = <%= @ip %><% end %>
	<% if @ip6 %>ipv6addr = <%= @ip6 %><% end %>
4
  <% if @proto %>proto = <%= @proto %><% end %>
5
6
7
	shortname = <%= @shortname %>
	secret = "<%= @secret %>"
	<% if @virtual_server %>virtual_server = <%= @virtual_server %><% end %>
8
	<% if @nastype %>nas_type = <%= @nastype %><% end %>
9
10
11
12
13
14
15
16
17
18
19
20
  require_message_authenticator = <%= @require_message_authenticator %>
  <% if @login %>login = <%= @login %><% end %>
  <% if @password %>password = <%= @password %><% end %>
  <% if @coa_server %>coa_server = <%= @coa_server %><% end %>
  <% if @response_window %>response_window = <%= @response_window %><% end %>
  <%- if @lifetime or @idle_timeout or @max_connections -%>
  limit {
    <% if @max_connections %>max_connections = <%= @max_connections %><% end %>
    <% if @lifetime %>lifetime = <%= @lifetime %><% end %>
    <% if @idle_timeout %>idle_timeout = <%= @idle_timeout %><% end %>
  }
  <%- end -%>
21
22
23
24
25
26
27
28
29
30
31
  <%- if !@attributes.empty? -%>
    <%- if @attributes.respond_to?('join') -%>
  <%= @attributes.join("\n  ") %>
    <%- elsif @attributes.is_a?(Hash) -%>
      <%- @attributes.sort.each do |k, v| -%>
  <%= k %> = <%= v %>
      <%- end -%>
    <%- else -%>
  <%= @attributes %>
    <%- end -%>
  <%- end -%>
32
}