Add --rpc-port option to select a custom RPC port
This commit is contained in:
parent
e0c05bf437
commit
da1201c552
|
@ -20,12 +20,13 @@ usage() {
|
|||
echo "$*"
|
||||
echo
|
||||
fi
|
||||
echo "usage: $0 [-x] [--no-leader-rotation] [rsync network path to bootstrap leader configuration] [network entry point]"
|
||||
echo "usage: $0 [-x] [--no-leader-rotation] [--rpc-port port] [rsync network path to bootstrap leader configuration] [network entry point]"
|
||||
echo
|
||||
echo " Start a full node on the specified network"
|
||||
echo
|
||||
echo " -x: runs a new, dynamically-configured full node"
|
||||
echo " --no-leader-rotation: disable leader rotation"
|
||||
echo " --rpc-port port: custom RPC port for this node"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
@ -47,6 +48,12 @@ if [[ $1 = --no-leader-rotation ]]; then
|
|||
shift
|
||||
fi
|
||||
|
||||
maybe_rpc_port=
|
||||
if [[ $1 = --rpc-port ]]; then
|
||||
maybe_rpc_port="--rpc $2"
|
||||
shift 2
|
||||
fi
|
||||
|
||||
if [[ -d $SNAP ]]; then
|
||||
if [[ $(snapctl get leader-rotation) = false ]]; then
|
||||
maybe_no_leader_rotation="--no-leader-rotation"
|
||||
|
@ -211,6 +218,7 @@ done
|
|||
trap 'kill "$pid" && wait "$pid"' INT TERM
|
||||
$program \
|
||||
$maybe_no_leader_rotation \
|
||||
$maybe_rpc_port \
|
||||
--identity "$fullnode_json_path" \
|
||||
--network "$leader_address" \
|
||||
--ledger "$ledger_config_dir"/ledger \
|
||||
|
|
Loading…
Reference in New Issue