load blocks from bootstrap if exists

This commit is contained in:
Jeffrey Paul 2016-04-11 17:58:36 +02:00
parent a1aaf94b70
commit 439c9ab716
Signed by: sneak
GPG Key ID: 052443F4DF2A55C2
1 changed files with 14 additions and 6 deletions

View File

@ -10,14 +10,22 @@ rpcuser=${BITCOIND_RPCUSER:-rpcuser}
rpcpassword=${BITCOIND_RPCPASSWORD:-$RANDOMPW}
EOF
ARGS=""
ARGS+=" -printtoconsole"
ARGS+=" -disablewallet"
ARGS+=" -datadir=$HOME"
ARGS+=" -conf=$HOME/bitcoin.conf"
ARGS+=" -rpcallowip=::/0"
if [[ ! -d $HOME/blocks ]]; then
if [[ -e $HOME/bootstrap.dat ]]; then
ARGS+=" -loadblock=$HOME/bootstrap.dat"
fi
fi
chown -R bitcoin:bitcoin $HOME
exec chpst -ubitcoin \
bitcoind \
-printtoconsole \
-disablewallet \
-datadir=/var/lib/bitcoin \
-conf=/var/lib/bitcoin/bitcoin.conf \
-rpcallowip=::/0 \
bitcoind $ARGS \
$BITCOIND_EXTRA_OPTS \
2>&1