summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-01-25 10:46:09 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-01-25 10:46:09 -0200
commitfce2a855df65a0a4072aeb2d255eb587f1643782 (patch)
tree1a30f7091a44e0095cd4fb644e9e3683c3218d0b
parent61cab6ec0dceb171a148e5cbf31957de15c03de4 (diff)
downloadpuppet-bitcoind-fce2a855df65a0a4072aeb2d255eb587f1643782.tar.gz
puppet-bitcoind-fce2a855df65a0a4072aeb2d255eb587f1643782.tar.bz2
Adding pattern parameter and enabling service according to ensure parameter
-rw-r--r--manifests/init.pp8
1 files changed, 7 insertions, 1 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index e48bbfe..684154d 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -52,11 +52,17 @@ class bitcoind($daemon_args = '-daemon', $rpcpassword, $ensure = 'running') {
notify => Service['bitcoind'],
}
+ $enable = $ensure ? {
+ 'running' => true,
+ default => false,
+ }
+
service { 'bitcoind':
- enable => true,
+ enable => $enable,
ensure => $ensure,
hasrestart => true,
hasstatus => false,
+ pattern => '/usr/lib/bitcoin/bitcoind',
require => [ Package['bitcoind'], File['/var/lib/bitcoin/.bitcoin/bitcoin.conf', '/etc/init.d/bitcoind'] ],
}
}