Files
shurikenpi.io/Scripts/create_configuration.sh
2023-08-31 22:45:14 +02:00

32 lines
967 B
Bash
Executable File
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
source ./global.sh
source ./utils.sh
new_configuration(){
msg logo.txt
p "We will create a new configuration"
msg wallet_suggestions.txt
echo ""
r "Your bitcoin address:" address
#python3 ../Tools/address_validation.py $address
echo ""
echo -e " \033[33m?\033[0m Which mining pool would you like to use?"
mining_pool=$(gum choose --cursor=    public-pool.io solo.ckpool.org custom)
p_user $mining_pool
if [[ $mining_pool == "custom" ]]; then
r "Mining pool stratum URL:" $mining_pool
fi
echo ""
p "Creating worker.sh"
python3 ../Tools/create_worker.py $mining_pool $address > ../Worker/worker.sh
chmod +x ../Worker/worker.sh
echo "address: $address" > ../Worker/worker.conf
echo "pool: $mining_pool" >> ../Worker/worker.conf
p "Ready to boil the oceans captain!"
p_ok "To start mining, use the command 'shuriken start'"
echo ""
}
new_configuration