aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authordrebs <drebs@riseup.net>2012-01-11 01:10:36 -0200
committerdrebs <drebs@riseup.net>2012-01-11 01:10:36 -0200
commitde068866889976b7f30391c5fb794cda53544c67 (patch)
tree3403d283fcbce8ce47715382d837c8e3df37ebb6 /templates
parent6e49deaaf26b693ca3538b0239ba7f998d81ef37 (diff)
downloadpuppet-tor-de068866889976b7f30391c5fb794cda53544c67.tar.gz
puppet-tor-de068866889976b7f30391c5fb794cda53544c67.tar.bz2
parts of configuration are independent
Diffstat (limited to 'templates')
-rw-r--r--templates/torrc.directory.erb12
-rw-r--r--templates/torrc.global.erb15
-rw-r--r--templates/torrc.header.erb15
-rw-r--r--templates/torrc.relay.erb4
4 files changed, 23 insertions, 23 deletions
diff --git a/templates/torrc.directory.erb b/templates/torrc.directory.erb
index 56cfae0..14712ef 100644
--- a/templates/torrc.directory.erb
+++ b/templates/torrc.directory.erb
@@ -1,12 +1,12 @@
# directory listing
-<%- if dir_port != '0' then -%>
-DirPort <%= dir_port %>
+<%- if port != '0' then -%>
+DirPort <%= port %>
<%- end -%>
-<%- if dir_listen_address != '' then -%>
-DirListenAddress <%= dir_listen_address %>
+<%- for listen_address in listen_addresses -%>
+DirListenAddress <%= listen_address %>
<%- end -%>
-<%- if dir_port_front_page != '' then -%>
-DirPortFrontPage <%= dir_port_front_page %>
+<%- if port_front_page != '' then -%>
+DirPortFrontPage <%= port_front_page %>
<%- end -%>
diff --git a/templates/torrc.global.erb b/templates/torrc.global.erb
new file mode 100644
index 0000000..96ea930
--- /dev/null
+++ b/templates/torrc.global.erb
@@ -0,0 +1,15 @@
+# runtime
+
+RunAsDaemon 1
+DataDirectory <%= data_dir %>
+
+# log
+
+<%- if log_rules != [] then -%>
+<%- for log_rule in log_rules -%>
+Log <%= log_rule %>
+<%- end -%>
+<%- else -%>
+Log notice syslog
+<%- end -%>
+
diff --git a/templates/torrc.header.erb b/templates/torrc.header.erb
index b393631..79d6da9 100644
--- a/templates/torrc.header.erb
+++ b/templates/torrc.header.erb
@@ -1,17 +1,2 @@
# This file is managed by puppet.
-# runtime
-
-RunAsDaemon 1
-DataDirectory <%= data_directory %>
-
-# log
-
-<%- if log_rules != [] then -%>
-<%- for log_rule in log_rules -%>
-Log <%= log_rule %>
-<%- end -%>
-<%- else -%>
-Log notice syslog
-<%- end -%>
-
diff --git a/templates/torrc.relay.erb b/templates/torrc.relay.erb
index 9531c9b..d9f06ae 100644
--- a/templates/torrc.relay.erb
+++ b/templates/torrc.relay.erb
@@ -19,9 +19,9 @@ RelayBandwidthBurst <%= relay_bandwidth_burst %> KB
<%- end -%>
<%- if accounting_max != '0' then -%>
AccountingMax <%= accounting_max %> GB
-<%- end -%>
-<%- for accounting in accounting_start -%>
+<%- for accounting in accounting_start -%>
AccountingStart <%= accounting_start %>
+<%- end -%>
<%- end -%>
<%- if contact_info != '' then -%>
ContactInfo <%= contact_info %>