Skip to content

Instantly share code, notes, and snippets.

@WietseWind
Last active August 16, 2024 20:47
Show Gist options
  • Save WietseWind/2ed35d85dcd056d82645de2958934f86 to your computer and use it in GitHub Desktop.
Save WietseWind/2ed35d85dcd056d82645de2958934f86 to your computer and use it in GitHub Desktop.
Xahaud RPC Mainnet Node (in Docker) binary update
update=2023.12.29-release+689
container=$(docker ps -a |grep xahau|cut -d " " -f 1)
build=$(docker exec -it $container /opt/xahaud/bin/xahaud -q --version|rev|cut -d "+" -f 1|rev|sed 's/[^0-9]*//g')
docker exec -it $container sh -c "curl https://build.xahau.tech/$update > /opt/xahaud/bin/new"
docker exec -it $container chmod +x /opt/xahaud/bin/new
newbuild=$(docker exec -it $container /opt/xahaud/bin/new -q --version|rev|cut -d "+" -f 1|rev|sed 's/[^0-9]*//g')
if [[ "$newbuild" -lt "$build" ]]; then
echo "Not OK, $build gt $newbuild"
exit 1
fi
docker exec -it $container mv /opt/xahaud/bin/xahaud /opt/xahaud/bin/$build
docker exec -it $container mv /opt/xahaud/bin/new /opt/xahaud/bin/xahaud
docker exec -it $container systemctl restart xahaud
sleep 3 && docker exec -it $container /opt/xahaud/bin/xahaud server_info |egrep 'build|complet|upti'
# Use this if you have installed Xahaud natively (without Docker)
# https://gist.github.com/WietseWind/9480a4fc95e904e54524406005c8c963
@eltaura
Copy link

eltaura commented Aug 16, 2024

Hi Mr. Wietse, are you going to post an update of the script for the current release ? Thanks !!

@WietseWind
Copy link
Author

Hi Mr. Wietse, are you going to post an update of the script for the current release ? Thanks !!

No need, just change the version on line 1 into another version (the most recent one) and run it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment