fix up some nits in multinode-demo
This commit is contained in:
parent
7fd7310b96
commit
98ee4b4672
|
@ -104,7 +104,7 @@ if $node_type_validator; then
|
||||||
$solana_fullnode_config --keypair="$validator_id_path" "${validator_address_args[@]}" > "$SOLANA_CONFIG_VALIDATOR_DIR"/validator.json
|
$solana_fullnode_config --keypair="$validator_id_path" "${validator_address_args[@]}" > "$SOLANA_CONFIG_VALIDATOR_DIR"/validator.json
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ls -lh "$SOLANA_CONFIG_DIR"/
|
ls -lhR "$SOLANA_CONFIG_DIR"/
|
||||||
if $node_type_leader; then
|
if $node_type_leader; then
|
||||||
ls -lh "$SOLANA_CONFIG_PRIVATE_DIR"
|
ls -lhR "$SOLANA_CONFIG_PRIVATE_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -14,7 +14,7 @@ usage() {
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ $1 = -h || -n $3 ]]; then
|
if [[ $1 = -h ]]; then
|
||||||
usage
|
usage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -25,13 +25,17 @@ else
|
||||||
self_setup=0
|
self_setup=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -n $3 ]]; then
|
||||||
|
usage
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -d $SNAP ]]; then
|
if [[ -d $SNAP ]]; then
|
||||||
# Exit if mode is not yet configured
|
# Exit if mode is not yet configured
|
||||||
# (typically the case after the Snap is first installed)
|
# (typically the case after the Snap is first installed)
|
||||||
[[ -n $(snapctl get mode) ]] || exit 0
|
[[ -n $(snapctl get mode) ]] || exit 0
|
||||||
|
|
||||||
# Select leader from the Snap configuration
|
# Select leader from the Snap configuration
|
||||||
leader_address="$(snapctl get leader-address)"
|
leader_address=$(snapctl get leader-address)
|
||||||
if [[ -z $leader_address ]]; then
|
if [[ -z $leader_address ]]; then
|
||||||
# Assume public testnet by default
|
# Assume public testnet by default
|
||||||
leader_address=35.230.65.68 # testnet.solana.com
|
leader_address=35.230.65.68 # testnet.solana.com
|
||||||
|
@ -41,9 +45,9 @@ else
|
||||||
if [[ -z $1 ]]; then
|
if [[ -z $1 ]]; then
|
||||||
leader=${1:-${here}/..} # Default to local solana repo
|
leader=${1:-${here}/..} # Default to local solana repo
|
||||||
leader_address=${2:-127.0.0.1} # Default to local leader
|
leader_address=${2:-127.0.0.1} # Default to local leader
|
||||||
elif [[ -z "$2" ]]; then
|
elif [[ -z $2 ]]; then
|
||||||
leader=$1
|
leader=$1
|
||||||
leader_address=$(dig +short "$1" | head -n1)
|
leader_address=$(dig +short "${leader%:*}" | head -n1)
|
||||||
if [[ -z $leader_address ]]; then
|
if [[ -z $leader_address ]]; then
|
||||||
usage "Error: unable to resolve IP address for $leader"
|
usage "Error: unable to resolve IP address for $leader"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue