load blocks from bootstrap if exists
This commit is contained in:
parent
a1aaf94b70
commit
439c9ab716
20
bitcoin.run
20
bitcoin.run
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue