improved random pw generation, no external package

This commit is contained in:
Jeffrey Paul 2019-09-18 13:52:17 -07:00
parent eaa7b8b6ff
commit b9482d0aaf
2 changed files with 1 additions and 3 deletions

View File

@ -21,14 +21,12 @@ RUN \
libboost-system-dev \
libboost-test-dev \
libboost-thread-dev \
libdigest-sha-perl \
libevent-dev \
libminiupnpc-dev \
libssl-dev \
libtool \
libzmq3-dev \
libzmq5 \
perl \
pkg-config \
&& \
apt-get clean && \

View File

@ -3,7 +3,7 @@
export HOME="/var/lib/bitcoind"
# gen random pw for rpc server
RANDOMPW=$(dd if=/dev/urandom bs=10 count=1 status=none | shasum | cut -b 1-20)
RANDOMPW=$(tr -dc 'a-f0-9' < /dev/urandom | head -c20)
cat <<EOF > $HOME/bitcoin.conf
rpcuser=${BITCOIND_RPCUSER:-rpcuser}