summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2012-06-18 12:52:57 -0300
committerSilvio Rhatto <rhatto@riseup.net>2012-06-18 12:52:57 -0300
commit09c2e65d73b4edbfb49df2162de7f83d5c6c23e5 (patch)
tree79ebd25b594ceeec95855b0ac75edb2b8b93ad31 /manifests
parent146ee46c31d124168fd523b8ed9fc170e4aa49df (diff)
downloadpuppet-apache-09c2e65d73b4edbfb49df2162de7f83d5c6c23e5.tar.gz
puppet-apache-09c2e65d73b4edbfb49df2162de7f83d5c6c23e5.tar.bz2
Managing tor hidden service folder
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp10
1 files changed, 10 insertions, 0 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 52f17fb..8ad1279 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -220,9 +220,19 @@ class apache {
# 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 => present,
+ owner => 'debian-tor',
+ group => 'debian-tor',
+ mode => 0700,
+ }
+ }
+
tor::daemon::hidden_service { $title:
ports => "80 127.0.0.1:80",
data_dir => "$tor::daemon::data_dir/hidden",
+ require => File["$tor::daemon::data_dir/hidden"],
}
}