Skip to content

Instantly share code, notes, and snippets.

@jkowalcz
Created July 15, 2021 14:30
Show Gist options
  • Save jkowalcz/82be917430b8806d07fde433d24ff81d to your computer and use it in GitHub Desktop.
Save jkowalcz/82be917430b8806d07fde433d24ff81d to your computer and use it in GitHub Desktop.
Wait until out of consensus (Helium HNT validator)
#!/bin/bash
while [ `docker exec validator miner info in_consensus` = "true" ]
do
echo -n "`date +"%Y-%m-%d--%T-%Z"` " >> /var/log/consensus-wait.log
echo "Waiting until out of Consesus" >> /var/log/consensus-wait.log
sleep 120
done
echo -n `date +"%Y-%m-%d--%T-%Z"` >> /var/log/consensus-wait.log
echo -n " `docker exec validator miner info in_consensus` " >> /var/log/consensus-wait.log
echo "Running $1 " >> /var/log/consensus-wait.log
#Running command off command line
$1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment