Skip to content
This repository has been archived by the owner on Jul 18, 2022. It is now read-only.

Commit

Permalink
client config: allow to make some parameters optional
Browse files Browse the repository at this point in the history
this allows to unset the non mandatory
openvpn client options. Options are:
- auth
- nsr-cert-type
- cipher
- compression
  • Loading branch information
trefzer committed Jan 4, 2021
1 parent 4e3e32a commit bfb75d6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions templates/client.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ key <%= @cert %>.key
<% if @tls_auth_key -%>
tls-auth <%= @tls_auth_key %> 1
<% end -%>
<% if @auth -%>
<% if @auth != '' -%>
auth <%= @auth %>
<% end -%>
<% if @openvpn_user -%>
Expand All @@ -21,11 +21,13 @@ user <%= @openvpn_user %>
<% if @openvpn_group -%>
group <%= @openvpn_group %>
<% end -%>
<% if @ns_cert_type -%>
<% if @ns_cert_type != '' -%>
ns-cert-type <%= @ns_cert_type %>
<% end -%>
<% if @cipher != '' -%>
cipher <%= @cipher %>
<% if @compression -%>
<% end -%>
<% if @compression != '' -%>
comp-<%= @compression %>
<% end -%>
verb <%= @verb %>
Expand Down

0 comments on commit bfb75d6

Please sign in to comment.