Changeset View
Changeset View
Standalone View
Standalone View
contrib/teamcity/ibd.sh
Show All 16 Lines | |||||
chmod +x bitcoind | chmod +x bitcoind | ||||
cleanup() { | cleanup() { | ||||
echo "Terminating (pid: ${1})" | echo "Terminating (pid: ${1})" | ||||
pkill -P ${MYPID} tail || true | pkill -P ${MYPID} tail || true | ||||
} | } | ||||
# Launch bitcoind using this script's parameters | # Launch bitcoind using this script's parameters | ||||
./bitcoind -datadir=ibd "$*" & | ./bitcoind -datadir=ibd $* & | ||||
bitcoin_pid=$! | bitcoin_pid=$! | ||||
trap "cleanup ${bitcoin_pid}" EXIT | trap "cleanup ${bitcoin_pid}" EXIT | ||||
# Wait for IBD to finish and kill the daemon | # Wait for IBD to finish and kill the daemon | ||||
( | ( | ||||
set +o pipefail | set +o pipefail | ||||
tail -f ibd/debug.log | grep -m 1 'progress=1.000000' | tail -f ibd/debug.log | grep -m 1 'progress=1.000000' | ||||
Show All 10 Lines |