Created
April 25, 2018 21:47
-
-
Save E-D-A/83f784bd218c01f4635e8b208c1fa40d to your computer and use it in GitHub Desktop.
STEEM Witness check for docker setup. Auto recovery from GREEN D..K attack :)
This file contains 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/bash | |
count=0 | |
while [ $count -lt 3 ]; | |
do | |
if docker logs --tail 10 witness | grep handle_block; | |
then | |
echo "All OK. Count value: $count" | |
sleep 120 | |
else | |
let "count = count + 1" | |
echo "no processed blocks" | |
./run.sh stop | |
echo "stopped" | |
sleep 15 | |
echo "starting" | |
./run.sh start | |
echo "started" | |
sleep 120 | |
fi; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment