-
Notifications
You must be signed in to change notification settings - Fork 97
/
taurus.sh
143 lines (104 loc) · 5.72 KB
/
taurus.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#!/bin/bash
echo -e "\033[0;37m"
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++";
echo " ##### #### #### #### #### ###### ########## #### #### ########### #### ####";
echo " ###### #### ###### #### #### ######## ########## #### #### #### #### #### ####";
echo " ####### #### ### ### ######## #### #### #### #### #### #### #### ########";
echo " #### ####### ########## ######## #### #### #### #### #### ########### ########";
echo " #### ###### ############ #### #### #### #### #### #### #### #### #### #### ####";
echo " #### ##### #### #### #### #### ######## #### ############ #### #### #### ####";
echo " #### #### #### #### #### #### #### #### ############ #### #### #### ####";
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++";
echo -e '\e[36mTwitter :\e[39m' https://twitter.com/NakoTurk
echo -e '\e[36mGithub :\e[39m' https://github.com/okannako
echo -e '\e[36mYoutube :\e[39m' https://www.youtube.com/@CryptoChainNakoTurk
echo -e "\e[0m"
sleep 5
echo -e "\e[1m\e[32m Güncellemeler/Updating \e[0m" && sleep 2
sudo apt update && sudo apt install ocl-icd-opencl-dev ocl-icd-libopencl1 libopencl-clang-dev libgomp1 -y && sudo apt install wget -y && cd $HOME
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo -e "\e[1m\e[91m Eğer node çalıştırıyorsanız eski datayı silmek için onaylayın / If you are already running node, confirm to delete the old data. (y/n) \e[0m"
read -p "(y/n)?" response
if [[ $response =~ ^(yes|y| ) ]] || [[ -z $response ]]; then
sudo systemctl stop subspace-farmer.service
sudo systemctl stop subspace-node.service
subspace-farmer wipe
subspace-node purge-chain --chain gemini-3h
fi
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
wget https://github.com/autonomys/subspace/releases/download/taurus-2024-nov-01/subspace-farmer-ubuntu-x86_64-skylake-taurus-2024-nov-01
wget https://github.com/autonomys/subspace/releases/download/taurus-2024-nov-01/subspace-node-ubuntu-x86_64-skylake-taurus-2024-nov-01
sudo mv subspace-node-ubuntu-x86_64-skylake-taurus-2024-nov-01 /usr/local/bin/subspace-node
sudo mv subspace-farmer-ubuntu-x86_64-skylake-taurus-2024-nov-01 /usr/local/bin/subspace-farmer
sudo chmod +x /usr/local/bin/subspace*
sudo systemctl start subspace-farmer.service
sudo systemctl start subspace-node.service
mkdir subspacenode
sudo chmod 700 ~/subspacenode
mkdir subspacefarmer
sudo chmod 700 ~/subspacefarmer
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo -e "\e[1m\e[32m Subspace Cüzdan Adresi / Enter Subspace wallet address. \e[0m"
read -p "Address: " ADDRESS
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo -e "\e[1m\e[32m Node İsmi Girin / Enter a name for the node. \e[0m"
read -p "Node Name : " NODE_NAME
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo -e "\e[1m\e[32m Plot Değeri Girin / Enter the Plot Size value. \e[0m"
read -p "Plot Size : " PLOTSIZE
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo -e "\e[1m\e[92m Node Name: \e[0m" $NODE_NAME
echo -e "\e[1m\e[92m Address: \e[0m" $ADDRESS
echo -e "\e[1m\e[92m Plot Size: \e[0m" $PLOTSIZE
echo -e "\e[1m\e[91m 11.1 Do you confirm the information (y/n) \e[0m"
read -p "(y/n)?" response
if [[ $response =~ ^(yes|y| ) ]] || [[ -z $response ]]; then
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo -e "\e[1m\e[32m Servis Oluşturma / Create a service file for the Node \e[0m"
echo "[Unit]
Description=Subspace Node
[Service]
User=$USER
ExecStart=subspace-node run --chain taurus --base-path /root/subspacenode --farmer --name '$NODE_NAME'
Restart=always
RestartSec=10
LimitNOFILE=10000
[Install]
WantedBy=multi-user.target" > $HOME/subspace-node.service
sudo mv $HOME/subspace-node.service /etc/systemd/system
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo -e "\e[1m\e[32m Create a service file for the Farmer \e[0m"
echo "[Unit]
Description=Subspace Farmer
[Service]
User=$USER
ExecStart=subspace-farmer farm --reward-address $ADDRESS path=/root/subspacefarmer,size=$PLOTSIZE
Restart=always
RestartSec=10
LimitNOFILE=10000
[Install]
WantedBy=multi-user.target" > $HOME/subspace-farmer.service
sudo mv $HOME/subspace-farmer.service /etc/systemd/system
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
sudo systemctl daemon-reload
sudo systemctl enable subspace-farmer.service
sudo systemctl enable subspace-node.service
sudo systemctl restart subspace-node.service
sudo systemctl restart subspace-farmer.service
echo -e "\e[1m\e[32mNode Started \e[0m"
echo -e "\e[1m\e[32mFarmer Started \e[0m"
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo -e "\e[1m\e[32mRelated Codes\e[0m"
echo -e "\e[1m\e[32mStart and Stop Node: \e[0m"
echo -e "\e[1m\e[39msystemctl start subspace-node.service \n \e[0m"
echo -e "\e[1m\e[39msystemctl stop subspace-node.service \n \e[0m"
echo -e "\e[1m\e[32mNode Logs: \e[0m"
echo -e "\e[1m\e[39mjournalctl -u subspace-node.service -f \n \e[0m"
echo -e "\e[1m\e[32mStart and Stop Farmer: \e[0m"
echo -e "\e[1m\e[39msystemctl start subspace-farmer.service \n \e[0m"
echo -e "\e[1m\e[39msystemctl stop subspace-farmer.service \n \e[0m"
echo -e "\e[1m\e[32mFarmer Logs: \e[0m"
echo -e "\e[1m\e[39mjournalctl -u subspace-farmer.service -f \n \e[0m"
else
echo -e "\e[1m\e[91mYou have terminated the process \e[0m"
fi