Skip to content

Instantly share code, notes, and snippets.

@c29r3
Created June 16, 2022 21:13
Show Gist options
  • Save c29r3/e7c4c5994470e19ae340fbe7e424ea68 to your computer and use it in GitHub Desktop.
Save c29r3/e7c4c5994470e19ae340fbe7e424ea68 to your computer and use it in GitHub Desktop.
solana-binary-update
#!/usr/bin/env bash
source ~/.profile
SERVICE_F="solana.service"
TUNER_F="sys-tuner.service"
if [[ -z $1 ]]; then
echo "Usage: $0 [version]"
exit 1
fi
set -ex
solana-install init "$@"
sudo systemctl daemon-reload
solana-validator --ledger $HOME/solana/validator-ledger/ wait-for-restart-window --min-idle-time 35 \
&& sudo systemctl restart ${TUNER_F} \
&& sudo systemctl restart ${SERVICE_F}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment