Skip to content

Instantly share code, notes, and snippets.

@nickhough
Last active March 16, 2021 15:25
Show Gist options
  • Save nickhough/138dbea1b6c375ba2ade3328f06f0519 to your computer and use it in GitHub Desktop.
Save nickhough/138dbea1b6c375ba2ade3328f06f0519 to your computer and use it in GitHub Desktop.
Helium Validator Update - For validators built from source
#!/bin/bash
echo "\nRunning git pull on helium/miner\n"
cd ~/miner &&
ALREADY_UP_TO_DATE="Already up to date."
GIT_STATUS=$(git pull)
echo "Git Status: $ALREADY_UP_TO_DATE\n"
if [ "$GIT_STATUS" != "$ALREADY_UP_TO_DATE" ]
then
echo "Running Update...\n"
./rebar3 as validator release &&
./_build/validator/rel/miner/bin/miner stop &&
./_build/validator/rel/miner/bin/miner start &&
./_build/validator/rel/miner/bin/miner info p2p_status
else
echo "No Update Required.\n"
./_build/validator/rel/miner/bin/miner info p2p_status
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment