show-ram.sh: Fix path mapping to compose file

Path maps directly to compose file in subdirectories:
op/reth/base-mainnet-op-reth-archive-trace -> op/reth/base-mainnet-op-reth-archive-trace.yml

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
rob
2026-02-07 09:52:28 +00:00
parent 67731beed0
commit f92f80abd0

View File

@@ -86,10 +86,10 @@ if [ -z "$NODE_PATH" ]; then
used_server_ram=$(free -h | awk '/^Mem:/ {print $3}') used_server_ram=$(free -h | awk '/^Mem:/ {print $3}')
echo "Server RAM: ${used_server_ram} / ${total_server_ram}" echo "Server RAM: ${used_server_ram} / ${total_server_ram}"
else else
# Specific node - extract compose name from path # Specific node - path maps directly to compose file
# Handle both "ethereum-mainnet-geth-archive" and "ethereum/geth/ethereum-mainnet-geth-archive" # e.g., "op/reth/base-mainnet-op-reth-archive-trace" -> "op/reth/base-mainnet-op-reth-archive-trace.yml"
COMPOSE_FILE="${BASEPATH}/${NODE_PATH}.yml"
COMPOSE_NAME=$(basename "$NODE_PATH") COMPOSE_NAME=$(basename "$NODE_PATH")
COMPOSE_FILE="${BASEPATH}/${COMPOSE_NAME}.yml"
if [ ! -f "$COMPOSE_FILE" ]; then if [ ! -f "$COMPOSE_FILE" ]; then
echo "Error: Compose file not found: $COMPOSE_FILE" echo "Error: Compose file not found: $COMPOSE_FILE"