]> gitweb.fluxo.info Git - puppet-bitcoind.git/commitdiff
Adding pattern parameter and enabling service according to ensure parameter
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 25 Jan 2013 12:46:09 +0000 (10:46 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 25 Jan 2013 12:46:09 +0000 (10:46 -0200)
manifests/init.pp

index e48bbfe8a24997dbfd263f84614e338a02fbfa1f..684154d868afc21b15d8cfb87efc89b60325f6b9 100644 (file)
@@ -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'] ],
   }
 }