jangko 2fd2665026
update hive client script
add enode.sh
use HIVE_BOOTNODES flag in nimbus.sh
2021-05-19 17:51:12 +07:00

16 lines
472 B
Bash

#!/bin/bash
# Script to retrieve the enode
#
# This is copied into the validator container by Hive
# and used to provide a client-specific enode id retriever
#
# Immediately abort the script on any error encountered
set -e
TARGET_RESPONSE=$(curl -s -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"net_nodeInfo","params":[],"id":1}' "localhost:8545" )
TARGET_ENODE=$(echo ${TARGET_RESPONSE}| jq -r '.result.enode')
echo "$TARGET_ENODE"