Skip to content

Instantly share code, notes, and snippets.

@E-D-A
Created April 25, 2018 21:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save E-D-A/83f784bd218c01f4635e8b208c1fa40d to your computer and use it in GitHub Desktop.
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 :)
#!/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