From 6e9ced5c0eda28b6a20384f6e5d00609342c11b8 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 22 Jun 2012 18:10:28 -0300 Subject: Adding mail::hidden for tor hidden services support --- manifests/hidden.pp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 manifests/hidden.pp (limited to 'manifests/hidden.pp') diff --git a/manifests/hidden.pp b/manifests/hidden.pp new file mode 100644 index 0000000..bdddcf2 --- /dev/null +++ b/manifests/hidden.pp @@ -0,0 +1,22 @@ +class mail::hidden { + # Make sure that the tor daemon is included + include tor::daemon + + # It's important to use a subdir from the tor datadir + # to ease backup/restore procedures as we don't mix + # hidden service data with other tor files. + if !defined(File["$tor::daemon::data_dir/hidden"]) { + file { "$tor::daemon::data_dir/hidden": + ensure => directory, + owner => 'debian-tor', + group => 'debian-tor', + mode => 0700, + } + } + + tor::daemon::hidden_service { 'mail': + ports => [ '80 127.0.0.1:80', '25 127.0.0.1:25', '993 127.0.0.1:993' ], + data_dir => "$tor::daemon::data_dir/hidden", + require => File["$tor::daemon::data_dir/hidden"], + } +} -- cgit v1.2.3