This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### | |
# пути к ключам будут вида /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 |