Changeset View
Changeset View
Standalone View
Standalone View
contrib/seeds/test-seeds.sh
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | if [ ! -x "${BITCOIN_CLI}" ]; then | ||||
echo "${BITCOIN_CLI} does not exist or has incorrect permissions." | echo "${BITCOIN_CLI} does not exist or has incorrect permissions." | ||||
exit 11 | exit 11 | ||||
fi | fi | ||||
BITCOIND="${BITCOIND} -connect=0 ${OPTION_TESTNET} -daemon" | BITCOIND="${BITCOIND} -connect=0 ${OPTION_TESTNET} -daemon" | ||||
BITCOIN_CLI="${BITCOIN_CLI} ${OPTION_TESTNET}" | BITCOIN_CLI="${BITCOIN_CLI} ${OPTION_TESTNET}" | ||||
>&2 echo "Spinning up bitcoind..." | >&2 echo "Spinning up bitcoind..." | ||||
${BITCOIND} | ${BITCOIND} || { | ||||
echo "Error starting bitcoind. Stopping script." | |||||
exit 12 | |||||
} | |||||
cleanup() { | cleanup() { | ||||
# Cleanup background processes spawned by this script. | # Cleanup background processes spawned by this script. | ||||
>&2 echo "Cleaning up bitcoin daemon..." | >&2 echo "Cleaning up bitcoin daemon..." | ||||
${BITCOIN_CLI} stop | ${BITCOIN_CLI} stop | ||||
} | } | ||||
trap "cleanup" EXIT | trap "cleanup" EXIT | ||||
# Short sleep to make sure the RPC server is available | # Short sleep to make sure the RPC server is available | ||||
▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines |