]> gitweb.fluxo.info Git - puppet-apache.git/commitdiff
Managing tor hidden service folder
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 18 Jun 2012 15:52:57 +0000 (12:52 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 18 Jun 2012 15:52:57 +0000 (12:52 -0300)
manifests/init.pp

index 52f17fb812ef4faaabf7cf63bd424cdd423d9dfc..8ad1279bf42c44e49a9536d783b569574ebdd1fe 100644 (file)
@@ -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"],
       }
     }