|
|
|
@ -46,15 +46,24 @@ if [[ ! -z "$STEEMD_PRIVATE_KEY" ]]; then |
|
|
|
|
ARGS+=" --private-key=$STEEMD_PRIVATE_KEY" |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
# without --data-dir it uses cwd as datadir(!) |
|
|
|
|
# who knows what else it dumps into current dir |
|
|
|
|
cd $HOME |
|
|
|
|
|
|
|
|
|
# overwrite local config with image one |
|
|
|
|
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 |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
# without --data-dir it uses cwd as datadir(!) |
|
|
|
|
# who knows what else it dumps into current dir |
|
|
|
|
cd $HOME |
|
|
|
|
|
|
|
|
|
# slow down restart loop if flapping |
|
|
|
|
sleep 1 |
|
|
|
|
|
|
|
|
|