-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathnimiq-client-reconfigure.sh
More file actions
48 lines (43 loc) · 1.64 KB
/
nimiq-client-reconfigure.sh
File metadata and controls
48 lines (43 loc) · 1.64 KB
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
#!/bin/bash
################################################################################
# Author: Bhlynd
# Program: Reconfigure Nimiq on Ubuntu
################################################################################
output() {
printf "\E[0;33;40m"
echo $1
printf "\E[0m"
}
displayErr() {
echo
echo $1;
echo
exit 1;
}
output " "
output "Please double check before hitting enter! You only have one shot at these!"
output " "
read -e -p "Enter the pool URL: " -i "au.porkypool.com:8444" POOL
read -e -p "Enter the miner CPU threads: " -i $(getconf _NPROCESSORS_ONLN) THREADS
read -e -p "Enter your wallet address: " WALLET
read -e -p "Enter device name: " EXTRADATA
read -e -p "Enter statistics interval in seconds: " -i "15" STATISTICS
output " "
output "Building launch script."
output " "
sleep 3
echo '#!/bin/bash
UV_THREADPOOL_SIZE='"${THREADS}"' ./miner --dumb --pool='"${POOL}"' --miner='"${THREADS}"' --wallet-address="'"${WALLET}"'" --extra-data="'"${EXTRADATA}"'" --statistics='"${STATISTICS}"'' > start
chmod u+x start
output "Congratulationts! If everything went well you can now start mining."
output " "
output "To start the miner type ./start"
output " "
output "If you need to change any settings, you can do so by editing the start file."
output ""
output "OR"
output ""
output "Run the below command to automate the process of editing the start file."
output "bash -c "'"$(curl -o - https://raw.githubusercontent.com/Bhlynd/Nimiq-Install-Script/master/nimiq-client-reconfigure.sh)"'""
output " "
sleep 3