From 9a00be3fd82f4343780b81762a1b67b16ac0070e Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 10 Aug 2012 18:09:45 -0300 Subject: Initial version --- manifests/init.pp | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 manifests/init.pp (limited to 'manifests') diff --git a/manifests/init.pp b/manifests/init.pp new file mode 100644 index 0000000..9c0b97c --- /dev/null +++ b/manifests/init.pp @@ -0,0 +1,41 @@ +class bitcoind($daemon_args = '') { + package { 'bitcoind': + ensure => installed, + } + + group { "bitcoin": + ensure => present, + allowdupe => false, + } + + user { "bitcoin": + ensure => present, + allowdupe => false, + gid => 'bitcoin', + home => '/var/lib/bitcoin', + require => Group['bitcoin'], + } + + file { '/var/lib/bitcoin': + ensure => directory, + owner => 'bitcoin', + group => 'bitcoin', + require => User['bitcoin'], + } + + file { '/etc/init.d/bitcoind': + ensure => present, + owner => root, + group => root, + mode => 0755, + content => template('bitcoind/bitcoind-init.d.sh.erb'), + } + + service { 'bitcoind': + enable => true, + ensure => running, + hasrestart => true, + hasstatus => false, + require => [ Package['bitcoind'], File['/var/lib/bitcoin', '/etc/init.d/bitcoind'] ], + } +} -- cgit v1.2.3