-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathQuickPoolClientSetup.sh
58 lines (32 loc) · 1.15 KB
/
QuickPoolClientSetup.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
#!/bin/bash
# Easy Setup Script for NodeJS Nimiq Miner
#Get Settings
echo 'Using NimiqPool.com'
usePool="--pool=node.nimiqpool.com:8444"
echo 'Using Mainnet'
echo 'Using mine.sh'
nimiqScript="mine.sh"
echo 'Please enter the number of Miningthreads: '
read nimiqThreads
echo 'Enter Wallet Address (NOT SEED): '
read nimiqAddress
echo 'Enter Extra-Data Field (Optional,Useful for multiple miners on the same Address): '
read nimiqExtra
#Required Setup
sudo apt-get update
sudo apt-get -y upgrade
#Install requirements
sudo apt-get install -y curl git build-essential python
#Setup NodeJS
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo npm install -g yarn
yarn global add gulp
git clone https://github.com/nimiq-network/core
nimiqDoD="--dumb"
#Generate Mining Runscript
touch $nimiqScript
chmod +x $nimiqScript
echo "cd core && git pull && yarn " > $nimiqScript
echo "cd clients/nodejs/" >> $nimiqScript
echo "env UV_THREADPOOL_SIZE=$nimiqThreads node index.js $usePool --wallet-address=\"$nimiqAddress\" --miner=$nimiqThreads --statistics=10 $nimiqDoD --extra-data=\"$nimiqExtra\"" >> $nimiqScript