summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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"],
}
}