Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -e
vote_account="/root/solana/vote-account-keypair.json"
identity_account="/root/solana/validator-keypair.json "
new_stake="/root/solana/validator-stake-keypair-$(printf '%(%Y-%m-%d)T').json"
min_vote_balance=100
available_for_withdraw=$(solana balance $vote_account | awk -F\. '{print $1}')
re='^[0-9]+$'
if ! [[ $available_for_withdraw =~ $re ]] ; then
####
# пути к ключам будут вида /solana/validator-keypair.json
# а на хосте они будут лежать в папке /root/solana_blabla. например /root/solana_agx10k
####
#######################################dockerfile####
echo "export SOLANA_NAME=<имя>" | tee -a ~/.bashrc ### например AG
source ~/.bashrc
echo "export SOLANA_DIR=/root/solana_${SOLANA_NAME}" | tee -a ~/.bashrc