diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-01-25 10:46:09 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-01-25 10:46:09 -0200 |
commit | fce2a855df65a0a4072aeb2d255eb587f1643782 (patch) | |
tree | 1a30f7091a44e0095cd4fb644e9e3683c3218d0b | |
parent | 61cab6ec0dceb171a148e5cbf31957de15c03de4 (diff) | |
download | puppet-bitcoind-fce2a855df65a0a4072aeb2d255eb587f1643782.tar.gz puppet-bitcoind-fce2a855df65a0a4072aeb2d255eb587f1643782.tar.bz2 |
Adding pattern parameter and enabling service according to ensure parameter
-rw-r--r-- | manifests/init.pp | 8 |
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'] ], } } |