From bd6b6a2e6c0d3a09127d8b6a342195d6f924de44 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Thu, 3 Nov 2016 11:58:57 +0000 Subject: Update template to really honor tor::daemon's safe_logging parameter. Without this change, using tor::daemon with the default safe_logging parameter results in a "SafeLogging 1" line being added to torrc, which is obviously not the intent of this piece of code. Also, this change makes parameters lookup consistent with how it's done everywhere else in this ERB template. --- templates/torrc.global.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/torrc.global.erb b/templates/torrc.global.erb index f577673..a02afc8 100644 --- a/templates/torrc.global.erb +++ b/templates/torrc.global.erb @@ -12,8 +12,8 @@ Log notice syslog Log <%= log_rule %> <% end -%> <% end -%> -<%- if @safe_logging != 1 then -%> -SafeLogging <%= @safe_logging %> +<%- if (v=scope.lookupvar('tor::daemon::safe_logging')) != '1' then -%> +SafeLogging <%= v %> <%- end -%> <% if (v=scope.lookupvar('tor::daemon::automap_hosts_on_resolve')) != '0' -%> -- cgit v1.2.3