From e2e22ff5475c4033cccdc21b0c941a9218834802 Mon Sep 17 00:00:00 2001 From: drebs Date: Wed, 11 Jan 2012 19:11:58 -0200 Subject: service subscribes to config file --- manifests/daemon.pp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'manifests/daemon.pp') 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', } -- cgit v1.2.3