Remove ip address hardcode. Fixes #959
This commit is contained in:
parent
5a57d9b5d9
commit
e175c9dea9
|
@ -173,8 +173,11 @@ find_leader() {
|
|||
# Select leader from the Snap configuration
|
||||
leader_ip=$(snapctl get leader-ip)
|
||||
if [[ -z $leader_ip ]]; then
|
||||
# Assume public testnet by default
|
||||
leader_ip=35.227.93.37 # testnet.solana.com
|
||||
leader=testnet.solana.com
|
||||
leader_ip=$(dig +short "${leader%:*}" | head -n1)
|
||||
if [[ -z $leader_ip ]]; then
|
||||
usage "Error: unable to resolve IP address for $leader"
|
||||
fi
|
||||
fi
|
||||
leader=$leader_ip
|
||||
leader_address=$leader_ip:8001
|
||||
|
|
|
@ -124,10 +124,11 @@ parts:
|
|||
mkdir -p $SNAPCRAFT_PART_INSTALL/scripts/
|
||||
cp -av scripts/* $SNAPCRAFT_PART_INSTALL/scripts/
|
||||
|
||||
# TODO: build curl,rsync/multilog from source instead of sneaking it in from the host
|
||||
# system...
|
||||
# TODO: build curl,dig,rsync/multilog from source instead of sneaking it
|
||||
# in from the host system...
|
||||
set -x
|
||||
mkdir -p $SNAPCRAFT_PART_INSTALL/bin
|
||||
cp -av /usr/bin/curl $SNAPCRAFT_PART_INSTALL/bin/
|
||||
cp -av /usr/bin/dig $SNAPCRAFT_PART_INSTALL/bin/
|
||||
cp -av /usr/bin/multilog $SNAPCRAFT_PART_INSTALL/bin/
|
||||
cp -av /usr/bin/rsync $SNAPCRAFT_PART_INSTALL/bin/
|
||||
|
|
Loading…
Reference in New Issue