aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2012-01-26 19:06:14 +0100
committerintrigeri <intrigeri@boum.org>2012-01-27 12:02:14 +0100
commitda59385e711976614d47a88cf607edda98900e75 (patch)
treeefda2effb974136a9f356e2614b31053118f2822
parent323c63a4303355f78272416843119606abecece1 (diff)
downloadpuppet-tor-da59385e711976614d47a88cf607edda98900e75.tar.gz
puppet-tor-da59385e711976614d47a88cf607edda98900e75.tar.bz2
Use data_dir variable instead of hard-coded path.
-rw-r--r--manifests/daemon.pp1
-rw-r--r--templates/torrc.hidden_service.erb2
2 files changed, 2 insertions, 1 deletions
diff --git a/manifests/daemon.pp b/manifests/daemon.pp
index 1d73c7d..1eaa1f7 100644
--- a/manifests/daemon.pp
+++ b/manifests/daemon.pp
@@ -131,6 +131,7 @@ class tor::daemon inherits tor {
# hidden services definition
define hidden_service( $ports = [],
+ $data_dir = $tor::daemon::data_dir,
$ensure = present ) {
concatenated_file_part { "05.hidden_service.${name}":
dir => $tor::daemon::snippet_dir,
diff --git a/templates/torrc.hidden_service.erb b/templates/torrc.hidden_service.erb
index 1a35faa..b9f758a 100644
--- a/templates/torrc.hidden_service.erb
+++ b/templates/torrc.hidden_service.erb
@@ -1,5 +1,5 @@
# hidden service <%= name %>
-HiddenServiceDir /var/lib/tor/<%= name %>
+HiddenServiceDir <%= data_dir %>/<%= name %>
<%- for port in ports -%>
HiddenServicePort <%= port %>
<%- end -%>