summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp20
1 files changed, 19 insertions, 1 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 506ad23..42251df 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -21,9 +21,27 @@ class bitcoind($daemon_args = '-daemon') {
ensure => directory,
owner => 'bitcoin',
group => 'bitcoin',
+ mode => 0750,
require => User['bitcoin'],
}
+ file { '/var/lib/bitcoin/.bitcoin':
+ ensure => directory,
+ owner => 'bitcoin',
+ group => 'bitcoin',
+ mode => 0750,
+ require => File['/var/lib/bitcoin'],
+ }
+
+ file { '/var/lib/bitcoin/.bitcoin/bitcoin.conf':
+ ensure => present,
+ owner => 'bitcoin',
+ group => 'bitcoin',
+ mode => 0640,
+ content => template('bitcoind/bitcoind.conf.erb'),
+ require => File['/var/lib/bitcoin/.bitcoin'],
+ }
+
file { '/etc/init.d/bitcoind':
ensure => present,
owner => root,
@@ -37,6 +55,6 @@ class bitcoind($daemon_args = '-daemon') {
ensure => running,
hasrestart => true,
hasstatus => false,
- require => [ Package['bitcoind'], File['/var/lib/bitcoin', '/etc/init.d/bitcoind'] ],
+ require => [ Package['bitcoind'], File['/var/lib/bitcoin/.bitcoin/bitcoin.conf', '/etc/init.d/bitcoind'] ],
}
}