aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorduritong <peter.meier+github@immerda.ch>2013-07-22 03:01:08 -0700
committerduritong <peter.meier+github@immerda.ch>2013-07-22 03:01:08 -0700
commit0e27df241f28987ea66a2b32a7a239f427b71bcd (patch)
treea80dae07c90c3805762af8691763dfc6594cc197
parent96b5bfeb4e3f0665725ae3417daff652c3d6ec7a (diff)
parent4f13ce12a5ed92b082d883e7a30eef1cd4a0500d (diff)
downloadpuppet-tor-0e27df241f28987ea66a2b32a7a239f427b71bcd.tar.gz
puppet-tor-0e27df241f28987ea66a2b32a7a239f427b71bcd.tar.bz2
Merge pull request #9 from pataquets/remove-unneeded-default-values
Don't add config entries to torrc if value is default
-rw-r--r--templates/torrc.exit_policy.erb2
-rw-r--r--templates/torrc.global.erb6
2 files changed, 7 insertions, 1 deletions
diff --git a/templates/torrc.exit_policy.erb b/templates/torrc.exit_policy.erb
index 92367c2..65f9d09 100644
--- a/templates/torrc.exit_policy.erb
+++ b/templates/torrc.exit_policy.erb
@@ -1,5 +1,5 @@
# exit policies: <%= name %>
-<%- if reject_private != 1 then -%>
+<%- if reject_private != '1' then -%>
ExitPolicyRejectPrivate <%= reject_private %>
<%- end -%>
<%- for policy in accept -%>
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 -%>