diff options
-rw-r--r-- | manifests/daemon.pp | 13 | ||||
-rw-r--r-- | manifests/init.pp | 5 |
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'], - } } |