update installer

This commit is contained in:
urban
2023-08-29 23:27:01 +02:00
parent 78740fc08e
commit a0527cb1d1
6 changed files with 48 additions and 13 deletions

BIN
Bin/cpuminer Executable file

Binary file not shown.

View File

@@ -3,6 +3,16 @@
source ./global.sh
source ./utils.sh
msg logo.txt
p "create a new configuration"
p "We will create a new configuration"
r "Your bitcoin address:" address
python3 ../Tools/address_validation.py $address
#python3 ../Tools/address_validation.py $address
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 "->" $mining_pool

View File

@@ -1,11 +1,12 @@
install_prerequisites(){
p "Installing pre-requisites..."
spin_it "goland-go (1/5)" sudo apt-get install -y golang-go
spin_it "gum       (2/5)" go install github.com/charmbracelet/gum@latest
spin_it "git       (3/5)" sudo apt-get install -y git
spin_it "tor       (4/5)" sudo apt-get install -y tor
spin_it "curl      (5/5)" sudo apt-get install -y curl
spin_it "goland-go (1/6)" sudo apt-get install -y golang-go
spin_it "gum       (2/6)" go install github.com/charmbracelet/gum@latest
spin_it "git       (3/6)" sudo apt-get install -y git
spin_it "tor       (4/6)" sudo apt-get install -y tor
spin_it "curl      (5/6)" sudo apt-get install -y curl
spin_it "screen    (6/6)" sudo apt-get install -y screen
}
go_to_install_directory(){

15
Tools/create_worker.py Normal file
View File

@@ -0,0 +1,15 @@
import sys
known_pools = ["public-pool.io", "solo.ckpool.org", "custom"]
def get_mining_parameters(pool, address):
if pool == "public-pool.io":
return "-a sha256d -o stratum+tcp://public-pool.io:21496 -u " + address
if pool == "solo.ckpool.org":
return "-a sha256d -o stratum+tcp://solo.ckpool.org:3333 -u " + address
# Special case when using custom pool
return "-a sha256d -o " + pool + " -u " + address
print (get_mining_parameters(sys.argv[1], sys.argv[2]))
#if sys.argv[1] == "-h" or sys.argv[1] == "--help":

3
Worker/readme.md Normal file
View File

@@ -0,0 +1,3 @@
Folder where the configuration is stored
DO NOT COMMIT ANYTHING HERE

View File

@@ -30,6 +30,11 @@ GIT_URL=https://github.com/Urban-Hacker/shurikenpi.io/
#!/bin/bash
r(){
p $1
read -p " " $2
}
p() {
echo -e " » $1"
}
@@ -60,7 +65,7 @@ gum(){
msg() {
echo ""
echo -e "$(cat ../messages/$1)"
echo -e "$(cat ../Messages/$1)"
echo ""
}
@@ -112,11 +117,12 @@ spin_it(){
install_prerequisites(){
p "Installing pre-requisites..."
spin_it "goland-go (1/5)" sudo apt-get install -y golang-go
spin_it "gum       (2/5)" go install github.com/charmbracelet/gum@latest
spin_it "git       (3/5)" sudo apt-get install -y git
spin_it "tor       (4/5)" sudo apt-get install -y tor
spin_it "curl      (5/5)" sudo apt-get install -y curl
spin_it "goland-go (1/6)" sudo apt-get install -y golang-go
spin_it "gum       (2/6)" go install github.com/charmbracelet/gum@latest
spin_it "git       (3/6)" sudo apt-get install -y git
spin_it "tor       (4/6)" sudo apt-get install -y tor
spin_it "curl      (5/6)" sudo apt-get install -y curl
spin_it "screen    (6/6)" sudo apt-get install -y screen
}
go_to_install_directory(){