Created
February 20, 2023 14:08
-
-
Save bimalm/13113904a833c139f610f2ccfce60965 to your computer and use it in GitHub Desktop.
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
| nc -w 3 $1 $2 >/dev/null | |
| if [ $? -ne 0 ] | |
| then | |
| echo "/ip4/$1/tcp/$2" | |
| fi |
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
| miner1 peer session|grep ip4|awk -F "/" '{ print "./check.sh " $7 " " $9 "&"}'|sed 's/|//g' >a.sh | |
| for i in $(bash a.sh|grep ip4) | |
| do | |
| echo $i | |
| miner1 peer disconnect $i | |
| done | |
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
| set execution permission for check.sh | |
| chmod +x check.sh | |
| Run below in a screen session : | |
| while [ 1 ]; do bash cleanup.sh; sleep 70 ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment