aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoramontero <amontero@166637.no-reply.drupal.org>2013-07-02 02:17:29 +0200
committeramontero <amontero@166637.no-reply.drupal.org>2013-07-02 02:17:29 +0200
commit8528e6d02444c39497e7aa88006661dd1adc9584 (patch)
treec124c74c0d2954f396193b7c697dcebc3f56792e
parentaf692e5858753ed695043ff8bc1d33f227fb0f85 (diff)
downloadpuppet-tor-8528e6d02444c39497e7aa88006661dd1adc9584.tar.gz
puppet-tor-8528e6d02444c39497e7aa88006661dd1adc9584.tar.bz2
Don't add config entries to torrc if value is default. ( duritong/puppet-tor#5 )
-rw-r--r--templates/torrc.global.erb6
1 files changed, 6 insertions, 0 deletions
diff --git a/templates/torrc.global.erb b/templates/torrc.global.erb
index 0bc3bf2..e0f6f7e 100644
--- a/templates/torrc.global.erb
+++ b/templates/torrc.global.erb
@@ -1,6 +1,8 @@
# runtime
RunAsDaemon 1
+<%- if scope.lookupvar('tor::daemon::data_dir') != '/var/lib/tor' then -%>
DataDirectory <%= scope.lookupvar('tor::daemon::data_dir') %>
+<%- end -%>
# log
<%- if scope.lookupvar('tor::daemon::log_rules') != [] then -%>
@@ -11,5 +13,9 @@ Log <%= log_rule %>
Log notice syslog
<%- end -%>
+<%- if scope.lookupvar('tor::daemon::automap_hosts_on_resolve') != '0' then -%>
AutomapHostsOnResolve <%= scope.lookupvar('tor::daemon::automap_hosts_on_resolve') %>
+<%- end -%>
+<%- if scope.lookupvar('tor::daemon::use_bridges') != '0' then -%>
UseBridges <%= scope.lookupvar('tor::daemon::use_bridges') %>
+<%- end -%>