Forked from etienne-napoleone/remove-faulty-peer.sh
Last active
January 17, 2019 09:49
-
-
Save thanhson1085/99bbdbc24e5a77b0d40fd6aee47a7d8e to your computer and use it in GitHub Desktop.
Remove faulty peer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# get tomochain container id | |
container_id=$(docker ps -q -f "name=tomochain") | |
# remove first peer | |
echo "\n------------------------\n!! Removing all peers\n------------------------\n" | |
docker exec -t $container_id tomo attach data/tomo.ipc --exec "for (i = 0; i < admin.peers.length; i++) { admin.removePeer(admin.peers[i].id) }" | |
# restart node | |
echo "\n------------------------\n!! Restarting node\n------------------------\n" | |
tmn update |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment