summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2012-08-11 13:21:51 -0300
committerSilvio Rhatto <rhatto@riseup.net>2012-08-11 13:21:51 -0300
commitd0bf25e781b9d44735c9d2932f01c3643bb7151b (patch)
tree01290490c156693c0e9834eb5ee29d151dd302d6 /manifests
parente4212ad9b6966d059109a44aa35fad0e6cf8f9dd (diff)
downloadpuppet-bitcoind-d0bf25e781b9d44735c9d2932f01c3643bb7151b.tar.gz
puppet-bitcoind-d0bf25e781b9d44735c9d2932f01c3643bb7151b.tar.bz2
Adding bitcoin.conf
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'] ],
}
}