aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authordrebs <drebs@riseup.net>2012-01-11 19:11:58 -0200
committerdrebs <drebs@riseup.net>2012-01-11 19:11:58 -0200
commite2e22ff5475c4033cccdc21b0c941a9218834802 (patch)
tree2c4f7ee97443da38487422b24578f2ae9dd8f262 /manifests
parentb3b30ab1819f9cd912ab935043b5f95625be9fb5 (diff)
downloadpuppet-tor-e2e22ff5475c4033cccdc21b0c941a9218834802.tar.gz
puppet-tor-e2e22ff5475c4033cccdc21b0c941a9218834802.tar.bz2
service subscribes to config file
Diffstat (limited to 'manifests')
-rw-r--r--manifests/daemon.pp13
-rw-r--r--manifests/init.pp5
2 files changed, 9 insertions, 9 deletions
diff --git a/manifests/daemon.pp b/manifests/daemon.pp
index d70674e..780fb21 100644
--- a/manifests/daemon.pp
+++ b/manifests/daemon.pp
@@ -8,15 +8,21 @@ class tor::daemon inherits tor {
$snippet_dir = "${spool_dir}/torrc.d"
# packages, user, group
- group { 'debian-tor':
- ensure => present,
- allowdupe => false,
+ service { 'tor':
+ ensure => running,
+ require => Package['tor'],
+ subscribe => File[$config_file],
}
Package[ 'tor', 'torsocks' ] {
require => File[$data_dir],
}
+ group { 'debian-tor':
+ ensure => present,
+ allowdupe => false,
+ }
+
user { 'debian-tor':
allowdupe => false,
comment => 'tor user,,,',
@@ -59,7 +65,6 @@ class tor::daemon inherits tor {
concatenated_file { "${config_file}":
dir => $snippet_dir,
mode => 0600,
- notify => Service['tor'],
owner => 'debian-tor', group => 'debian-tor',
}
diff --git a/manifests/init.pp b/manifests/init.pp
index 87e9773..fa2285d 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -5,9 +5,4 @@ class tor {
package { [ "tor", "torsocks" ]:
ensure => installed,
}
-
- service { "tor":
- ensure => running,
- require => Package['tor'],
- }
}