diff options
author | Micah <micah@riseup.net> | 2015-03-27 18:50:01 +0000 |
---|---|---|
committer | Micah <micah@riseup.net> | 2015-03-27 18:50:01 +0000 |
commit | 3925f36f7cd0f15029304363b0f5749750627c96 (patch) | |
tree | 5613a76af8c008a5820e41c097ed94f231412956 /templates/torrc.global.erb | |
parent | a31579095231c68a2786955b9149d3bcd13400af (diff) | |
parent | 19a44ce97f59633002d844e2b37f2b26b2f1cfbc (diff) | |
download | puppet-tor-3925f36f7cd0f15029304363b0f5749750627c96.tar.gz puppet-tor-3925f36f7cd0f15029304363b0f5749750627c96.tar.bz2 |
Merge branch 'improvements' into 'master'
Improvements
These are a bunch of improvements I got on my github profile in the past.
Interested in merging them?
Summary:
* adds tor repo management
* removes a workaround for a fixed bug
* adds tor-arm support
* support for safe logging
* puppet 3 ready templates.
It's merged on top of the current master.
See merge request !1
Diffstat (limited to 'templates/torrc.global.erb')
-rw-r--r-- | templates/torrc.global.erb | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/templates/torrc.global.erb b/templates/torrc.global.erb index 0bc3bf2..f577673 100644 --- a/templates/torrc.global.erb +++ b/templates/torrc.global.erb @@ -1,15 +1,24 @@ # runtime RunAsDaemon 1 -DataDirectory <%= scope.lookupvar('tor::daemon::data_dir') %> +<% if (v=scope.lookupvar('tor::daemon::data_dir')) != '/var/lib/tor' -%> +DataDirectory <%= v %> +<% end -%> # log -<%- if scope.lookupvar('tor::daemon::log_rules') != [] then -%> -<%- for log_rule in scope.lookupvar('tor::daemon::log_rules') -%> +<% if (rules=scope.lookupvar('tor::daemon::log_rules')).empty? -%> +Log notice syslog +<% else -%> +<% rules.each do |log_rule| -%> Log <%= log_rule %> +<% end -%> +<% end -%> +<%- if @safe_logging != 1 then -%> +SafeLogging <%= @safe_logging %> <%- end -%> -<%- else -%> -Log notice syslog -<%- end -%> -AutomapHostsOnResolve <%= scope.lookupvar('tor::daemon::automap_hosts_on_resolve') %> -UseBridges <%= scope.lookupvar('tor::daemon::use_bridges') %> +<% if (v=scope.lookupvar('tor::daemon::automap_hosts_on_resolve')) != '0' -%> +AutomapHostsOnResolve <%= v %> +<% end -%> +<% if (v=scope.lookupvar('tor::daemon::use_bridges')) != '0' -%> +UseBridges <%= v %> +<%- end -%> |