From 3ca021b6c85a5fb2a0cba7e027c0e0f308bf360e Mon Sep 17 00:00:00 2001 From: squidbear <379651+czarly@users.noreply.github.com> Date: Sat, 29 Mar 2025 08:21:12 +0100 Subject: [PATCH] this is so retraded --- berachain/scripts/init.sh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/berachain/scripts/init.sh b/berachain/scripts/init.sh index 433097bf..068ff7a0 100644 --- a/berachain/scripts/init.sh +++ b/berachain/scripts/init.sh @@ -47,16 +47,6 @@ if $BEACOND init ${MONIKER} --chain-id ${CHAINNAME}-beacon-${CHAINID} --home /ro curl -sL "$KZG_URL" -o "$CONFIG_DIR/kzg-trusted-setup.json" curl -sL "$CONFIG_TOML_URL" -o "$CONFIG_DIR/config.toml" curl -sL "$APP_TOML_URL" -o "$CONFIG_DIR/app.toml" - - # Update moniker if set - if [ -n "$MONIKER" ] && [ -f "$CONFIG_DIR/config.toml" ]; then - sed -i "s/^moniker = \".*\"/moniker = \"$MONIKER\"/" "$CONFIG_DIR/config.toml" - fi - - # Update RPC dial URL in app.toml - if [ -f "$CONFIG_DIR/app.toml" ]; then - sed -i "s|^rpc-dial-url = \".*\"|rpc-dial-url = \"$AUTH_RPC\"|" "$CONFIG_DIR/app.toml" - fi # somehow it's better to make home static to /root sed -i 's|~/|/root/|g' "$CONFIG_DIR/config.toml" @@ -79,6 +69,17 @@ if [ -n "$SEEDS" ] && [ -f "$CONFIG_DIR/config.toml" ]; then sed -i "s/^persistent_peers = \".*\"/persistent_peers = \"$SEEDS\"/" "$CONFIG_DIR/config.toml" fi +# Update RPC dial URL in app.toml +if [ -f "$CONFIG_DIR/app.toml" ]; then + sed -i "s|^rpc-dial-url = \".*\"|rpc-dial-url = \"$AUTH_RPC\"|" "$CONFIG_DIR/app.toml" +fi + +# Update moniker if set +if [ -n "$MONIKER" ] && [ -f "$CONFIG_DIR/config.toml" ]; then + sed -i "s/^moniker = \".*\"/moniker = \"$MONIKER\"/" "$CONFIG_DIR/config.toml" +fi + + #echo "$CONFIG_DIR/jwt.hex: $(cat $CONFIG_DIR/jwt.hex)" #cd "$CONFIG_DIR"