From 63477b2b5f303c9482be3e149a5a96ddf5f1766a Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Mon, 11 Apr 2016 05:43:05 +0200 Subject: [PATCH] overwrite conf file every run --- bitcoin.run | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/bitcoin.run b/bitcoin.run index 5ae3b61..b06439c 100644 --- a/bitcoin.run +++ b/bitcoin.run @@ -3,20 +3,15 @@ export HOME="/var/lib/bitcoin" # gen random pw for rpc server -DEFAULTPW=$(dd if=/dev/urandom bs=10 count=1 status=none | shasum | cut -b 1-20) +RANDOMPW=$(dd if=/dev/urandom bs=10 count=1 status=none | shasum | cut -b 1-20) -if [ ! -e "$HOME/bitcoin.conf" ]; then - - echo "creating bitcoin.conf" - - cat < $HOME/bitcoin.conf -rpcuser=${BITCOIND_RPC_USER:-rpcuser} -rpcpassword=${BITCOIND_RPC_PASSWORD:-$DEFAULTPW} +cat < $HOME/bitcoin.conf +rpcuser=${BITCOIND_RPCUSER:-rpcuser} +rpcpassword=${BITCOIND_RPCPASSWORD:-$RANDOMPW} EOF -fi - chown -R bitcoin:bitcoin $HOME + exec chpst -ubitcoin \ bitcoind \ -printtoconsole \