Skip to content

Commit

Permalink
fix error on startup if blockchain cache file does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
sneak committed Oct 1, 2016
1 parent 70119bc commit cbbd703
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions contrib/steemd.run
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,14 @@ cp /etc/steemd/config.ini $HOME/config.ini
chown steemd:steemd $HOME/config.ini

if [[ ! -d $HOME/blockchain ]]; then
# init with blockchain cached in image
ARGS+=" --replay-blockchain"
mkdir -p $HOME/blockchain/database
cd $HOME/blockchain/database
tar xvjpf /var/cache/steemd/blocks.tbz2
chown -R steemd:steemd $HOME/blockchain
if [[ -e /var/cache/steemd/blocks.tbz2 ]]; then
# init with blockchain cached in image
ARGS+=" --replay-blockchain"
mkdir -p $HOME/blockchain/database
cd $HOME/blockchain/database
tar xvjpf /var/cache/steemd/blocks.tbz2
chown -R steemd:steemd $HOME/blockchain
fi
fi

# without --data-dir it uses cwd as datadir(!)
Expand Down

0 comments on commit cbbd703

Please sign in to comment.