From d0bf25e781b9d44735c9d2932f01c3643bb7151b Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 11 Aug 2012 13:21:51 -0300 Subject: Adding bitcoin.conf --- manifests/init.pp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'manifests') 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'] ], } } -- cgit v1.2.3