diff options
author | intrigeri <intrigeri@boum.org> | 2012-08-04 16:29:37 +0200 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2012-08-04 16:29:37 +0200 |
commit | 43f26a0ff6e7e882ed241a26c99f09d669524440 (patch) | |
tree | 4da1f404ed301a809fd33ca9a0b1e61a9c475c53 /manifests | |
parent | d29669e13e276c1e5a399653c82f576dbc1700b8 (diff) | |
parent | d7ec8bf77c55f573138d41d5e24e1fb80e073b25 (diff) | |
download | puppet-tor-43f26a0ff6e7e882ed241a26c99f09d669524440.tar.gz puppet-tor-43f26a0ff6e7e882ed241a26c99f09d669524440.tar.bz2 |
Merge remote-tracking branch 'riseup/master' into shared-master
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/daemon.pp | 21 | ||||
-rw-r--r-- | manifests/munin.pp | 2 |
2 files changed, 16 insertions, 7 deletions
diff --git a/manifests/daemon.pp b/manifests/daemon.pp index 3a201e4..7661a43 100644 --- a/manifests/daemon.pp +++ b/manifests/daemon.pp @@ -101,9 +101,11 @@ class tor::daemon inherits tor { define relay( $port = 0, $listen_addresses = [], $outbound_bindaddresses = $listen_addresses, - $bandwidth_rate = 0, # KB/s, 0 for no limit. - $bandwidth_burst = 0, # KB/s, 0 for no limit. - $accounting_max = 0, # GB, 0 for no limit. + $bandwidth_rate = '', # KB/s, defaulting to using tor's default: 5120KB/s + $bandwidth_burst = '', # KB/s, defaulting to using tor's default: 10240KB/s + $relay_bandwidth_rate = 0, # KB/s, 0 for no limit. + $relay_bandwidth_burst = 0, # KB/s, 0 for no limit. + $accounting_max = 0, # GB, 0 for no limit. $accounting_start = [], $contact_info = '', $my_family = '', # TODO: autofill with other relays @@ -121,13 +123,20 @@ class tor::daemon inherits tor { } # control definition - define control( $port = 0, - $hashed_control_password = '', + define control( $port = 0, + $hashed_control_password = '', + $cookie_authentication = 0, + $cookie_auth_file = '', + $cookie_auth_file_group_readable = '', $ensure = present ) { - if $hashed_control_password == '' and $ensure != 'absent' { + if $cookie_authentication == '0' and $hashed_control_password == '' and $ensure != 'absent' { fail("You need to define the tor control password") } + + if $cookie_authentication == 0 and ($cookie_auth_file != '' or $cookie_auth_file_group_readable != '') { + notice("You set a tor cookie authentication option, but do not have cookie_authentication on") + } concatenated_file_part { '04.control': dir => $tor::daemon::snippet_dir, diff --git a/manifests/munin.pp b/manifests/munin.pp index ac2630a..8504f89 100644 --- a/manifests/munin.pp +++ b/manifests/munin.pp @@ -17,7 +17,7 @@ class tor::munin { munin::plugin { [ "tor_connections", "tor_routers", "tor_traffic" ]: ensure => present, - config => "user debian-tor\n env.cookiefile /var/lib/tor/control_auth_cookie", + config => "user debian-tor\n env.cookiefile /var/run/tor/control.authcookie", script_path_in => "/usr/local/share/munin-plugins"; } } |