diff options
author | Micah Anderson <micah@riseup.net> | 2013-04-03 16:57:50 -0400 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2013-04-03 16:57:50 -0400 |
commit | 84dc38021f4b49bf6e1fb1b4cf2b96f6dab77892 (patch) | |
tree | 3890e9baa3a659bfd04938e3185dbacc4408fc62 | |
parent | fbbcc3580bf337478e587db6a688e4b3efee3292 (diff) |
Reverting "update template to get rid of older (and unreliable) helper functions, these can lead to odd results when variables are explicitly set to undef, and should be avoided"
Revert "update template to get rid of older (and unreliable) helper functions, these can lead to odd results when variables are explicitly set to undef, and should be avoided"
This reverts commit fbbcc3580bf337478e587db6a688e4b3efee3292.
-rw-r--r-- | templates/service.conf.erb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/templates/service.conf.erb b/templates/service.conf.erb index cdf5542..d2fafaf 100644 --- a/templates/service.conf.erb +++ b/templates/service.conf.erb @@ -6,8 +6,8 @@ <%= 'debug = ' + debuglevel %> <%= 'pid = ' + real_pid %> <%- %w{chroot setuid setgid service compression}.each do |v| - if @v -%> -<%= v + " = " + @v %> + if has_variable?(v) and instance_variable_get("@#{v}").to_s != "false" -%> +<%= v + " = " + instance_variable_get("@#{v}").to_s %> <%- end end -%> @@ -20,15 +20,15 @@ end -%> <% end -%> <%- %w{output syslog}.each do |v| - if @v -%> -<%= v + " = " + @v %> + if has_variable?(v) and instance_variable_get("@#{v}").to_s != "false" -%> +<%= v + " = " + instance_variable_get("@#{v}").to_s %> <%- end end -%> <%- %w{egd engine enginectrl rndbytes rndfile rndoverwrite}.each do |v| - if @v -%> -<%= v + " = " + @v %> + if has_variable?(v) and instance_variable_get("@#{v}").to_s != "false" -%> +<%= v + " = " + instance_variable_get("@#{v}").to_s %> <%- end end -%> @@ -39,8 +39,8 @@ end -%> execargs failover ident key local oscp ocspflag options protocol protocolauthentication protocolhost protocolpassword protocolusername pty retry session sslversion stack timeoutbusy timeoutclose timeoutconnect timeoutidle transparent verify}.each do |v| - if @v -%> -<%= v + ' = ' + @v %> + if has_variable?(v) and instance_variable_get("@#{v}").to_s != "false" -%> +<%= v + ' = ' + instance_variable_get("@#{v}").to_s %> <%- end end -%> |