Files
ethereum-rpc-docker/op-lisk-sepolia.before-stop
Sebastian da991ae504 fix
2024-04-06 15:44:07 +02:00

11 lines
418 B
Bash
Executable File

#!/bin/bash
BASEPATH="$(dirname "$0")"
source $BASEPATH/.env
echo "running in $BASEPATH"
target_file="op-lisk-sepolia-node-$(date +'%Y-%m-%d-%H-%M-%S').peers"
docker exec rpc-op-lisk-sepolia-node-1 curl -s -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"opp2p_peers","params":[true],"id":1}' http://localhost:8545 | jq '.result.peers[].addresses[]' > "/backup/$target_file"