From 32afd174079e33b85f3439bb02b7dcea2efad9b3 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 2 Aug 2013 17:23:01 -0300 Subject: Adding rpcuser parameter --- manifests/init.pp | 5 +++++ templates/bitcoin.conf.erb | 1 + 2 files changed, 6 insertions(+) diff --git a/manifests/init.pp b/manifests/init.pp index 3081978..5139b1d 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,9 +1,14 @@ class bitcoind( $daemon_args = hiera('bitcoind::daemon_args', '-daemon'), + $rpcuser = hiera('bitcoind::rpcuser', ''), $rpcpassword = hiera('bitcoind::rpcpassword', ''), $ensure = hiera('bitcoind::ensure', 'running'), $maxconnections = hiera('bitcoind::maxconnections', 25) ) { + case $rpcuser { + '': { fail("You need to define etherpad database password! Please set bitcoind::rpcuser in your config") } + } + case $rpcpassword { '': { fail("You need to define etherpad database password! Please set bitcoind::rpcpassword in your config") } } diff --git a/templates/bitcoin.conf.erb b/templates/bitcoin.conf.erb index 1e68b85..14f359f 100644 --- a/templates/bitcoin.conf.erb +++ b/templates/bitcoin.conf.erb @@ -34,6 +34,7 @@ maxconnections=<%= maxconnections %> # You must set rpcuser and rpcpassword to secure the JSON-RPC api #rpcuser=Ulysseys #rpcpassword=YourSuperGreatPasswordNumber_385593 +rpcuser=<%= rpcuser %> rpcpassword=<%= rpcpassword %> # By default, only RPC connections from localhost are allowed. Specify -- cgit v1.2.3