From de068866889976b7f30391c5fb794cda53544c67 Mon Sep 17 00:00:00 2001 From: drebs Date: Wed, 11 Jan 2012 01:10:36 -0200 Subject: parts of configuration are independent --- templates/torrc.directory.erb | 12 ++++++------ templates/torrc.global.erb | 15 +++++++++++++++ templates/torrc.header.erb | 15 --------------- templates/torrc.relay.erb | 4 ++-- 4 files changed, 23 insertions(+), 23 deletions(-) create mode 100644 templates/torrc.global.erb (limited to 'templates') 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 %> -- cgit v1.2.3