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/daemon.pp | |
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/daemon.pp')
-rw-r--r-- | manifests/daemon.pp | 21 |
1 files changed, 15 insertions, 6 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, |