Set bootnodes for bootnode

This commit is contained in:
phahulin 2017-10-21 19:14:44 +03:00 committed by GitHub
parent 4db20f854a
commit c8345acadd
1 changed files with 3 additions and 0 deletions

View File

@ -103,6 +103,7 @@ INSTALL_CONFIG_REPO="https://raw.githubusercontent.com/oraclesorg/test-templates
GENESIS_REPO_LOC="https://raw.githubusercontent.com/oraclesorg/oracles-scripts/master/spec.json"
GENESIS_JSON="spec.json"
NODE_TOML="node.toml"
BOOTNODES_TXT="https://raw.githubusercontent.com/oraclesorg/test-templates/dev-mainnet/TestTestNet/bootnodes.txt"
echo "===== repo base path: ${INSTALL_CONFIG_REPO}"
@ -166,8 +167,10 @@ pull_image_and_configs() {
echo "=====> pull_image_and_configs"
# curl -s -O "${INSTALL_CONFIG_REPO}/../${GENESIS_JSON}"
curl -s -o "${GENESIS_JSON}" "${GENESIS_REPO_LOC}"
curl -s -o "bootnodes.txt" "${BOOTNODES_TXT}"
curl -s -O "${INSTALL_CONFIG_REPO}/${NODE_TOML}"
sed -i "/\[network\]/a nat=\"extip:${EXT_IP}\"" ${NODE_TOML}
sed -i "/\[network\]/a bootnodes=\[$(cat bootnodes.txt | sed 's/\r$//' | awk -F'#' '{ print $1 }' | awk '/enode/{ print "\""$1"\"" }' | paste -sd "," -)\]" ${NODE_TOML}
cat >> ${NODE_TOML} <<EOF
[misc]
log_file = "/home/${ADMIN_USERNAME}/logs/parity.log"