summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/init.pp')
-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'] ],
}
}