git.iko.soy/xmrig-bash-scripts
on master help sign in
Merge branch 'master' into develop
commit130017a2bbf3837d9eba2add9abc9e3b336b43e2 authorSean Wheller <sean@prepaidmeters.com> dateTue 30 Jul 2019, 14:53 (7 years ago) parentff381a3c263081
5 files changed+27−67
.gitignore+1 config.json−52 config.sh+2−12 depends.sh+5−2 settings.sh+19−1
.gitignore+1
@@ -1,3 +1,4 @@
11xmrig-cpu/
22*.swp
33crontab
4+config.json
config.jsondeleted−52
@@ -1,52 +0,0 @@
1−{
2− "api": "{",
3− "autosave": "true",
4− "background": "false",
5− "colors": "true",
6− "cpu": {
7− "enabled": true,
8− "huge-pages": true,
9− "hw-aes": null,
10− "priority": null,
11− "asm": true,
12− "cn": [
13− 0,
14− 1,
15− 2,
16− 3
17− ],
18− "cn/0": false,
19− "cn-lite/0": false
20− },
21− "donate-level": 5,
22− "donate-over-proxy": 1,
23− "http": {
24− "enabled": true,
25− "host": "192.168.10.93",
26− "port": 8080,
27− "access-token": null,
28− "restricted": false
29− },
30− "logfile": null,
31− "pools": [
32− {
33− "algo": "cn",
34− "url": "192.168.4.5:3333",
35− "user": "854sqm2Cm4TB2XgPHWqSPSbnFAe3SMzdEDzZHpukQ8NHBPFropbnkFmEKiZPgwjMFC9PTjaFscR2UU6ZwFCqJzGMUiZVbTM",
36− "pass": "sean-wks:user@example.com",
37− "rig-id": "sean-wks",
38− "nicehash": true,
39− "keepalive": true,
40− "enabled": true,
41− "tls": null,
42− "tls-fingerprint": null,
43− "daemon": false
44− }
45− ],
46− "print-time": 30,
47− "retries": 5,
48− "retry-pause": 5,
49− "syslog": "false",
50− "user-agent": "null",
51− "watch": "true"
52−}
config.sh+2−12
@@ -1,15 +1,5 @@
11#!/bin/bash
22
3−# This script can be run standalone or as part of install.sh
4−
5−_EMAIL="user@example.com"
6−
7−_RECEIVE_WALLET="854sqm2Cm4TB2XgPHWqSPSbnFAe3SMzdEDzZHpukQ8NHBPFropbnkFmEKiZPgwjMFC9PTjaFscR2UU6ZwFCqJzGMUiZVbTM"
8−
9−_POOL_SERVER_URL="192.168.4.5"
10−_POOL_SERVER_PORT="3333"
11−
12−#################################
133_API_ID="null"
144_API_WORKER_ID="$HOSTNAME"
155
@@ -21,7 +11,7 @@ _COLORS="true"
2111
2212_CPU_ENABLED="true"
2313_CPU_HUGE_PAGES="true"
24−_CPU_HW_AES="null"
14+_CPU_HW_AES="$_AES_NI"
2515_CPU_PRIORITY="null"
2616_CPU_ASM="true"
2717_CPU_CN="0 1 2 3"
@@ -41,7 +31,7 @@ _HTTP_RESTRICTED="false"
4131
4232_LOG_FILE="null"
4333
44−_POOLS_ALGO="cn"
34+_POOLS_ALGO="cn/r"
4535_POOLS_URL="$_POOL_SERVER_URL:$_POOL_SERVER_PORT"
4636_POOLS_USER="$_RECEIVE_WALLET"
4737_POOLS_PASS="$HOSTNAME:$_EMAIL"
depends.sh+5−2
@@ -7,8 +7,11 @@ echo "#################################"
77
88if [ $_APT_DEPENDS = 1 ]; then
99
10− sudo apt install -y jo screen software-properties-common git build-essential cmake libuv1-dev libssl-dev libmicrohttpd-dev gcc g++
11−
10+ sudo apt install -y cpuid jo screen software-properties-common git build-essential cmake libuv1-dev libssl-dev libmicrohttpd-dev gcc g++
11+ # Install xmrig depends
12+ sudo apt-get install git build-essential cmake libuv1-dev libmicrohttpd-dev libssl-dev libhwloc-dev
13+ # Install xmrig-bash-scripts depends
14+ sudo apt install jo cpuid
1215else
1316 echo "Depend install is set to NO ($_APT_DEPENDS) Skipping"
1417fi
settings.sh+19−1
@@ -4,6 +4,15 @@ echo "#################################"
44echo " LOADING SETTINGS "
55echo "#################################"
66
7+_EMAIL="user@example.com"
8+
9+_RECEIVE_WALLET="854sqm2Cm4TB2XgPHWqSPSbnFAe3SMzdEDzZHpukQ8NHBPFropbnkFmEKiZPgwjMFC9PTjaFscR2UU6ZwFCqJzGMUiZVbTM"
10+
11+_POOL_SERVER_URL="192.168.4.5"
12+_POOL_SERVER_PORT="3333"
13+
14+#################################
15+
716# Set working directory
817_WORK_DIR="$(pwd)"
918cd $_WORK_DIR
@@ -22,7 +31,7 @@ _XMRIG_CLONE_LOCATION="$_WORK_DIR/$_XMRIG_CLONE"
2231echo -e "Source folder location: $_XMRIG_CLONE_LOCATION\n"
2332
2433# Set branch from which to build
25−_XMRIG_BRANCH="beta"
34+_XMRIG_BRANCH="master"
2635echo -e "Build branch: $_XMRIG_BRANCH\n"
2736
2837# Set build directory
@@ -87,6 +96,15 @@ else
8796 echo "vm.nr_hugepages=$_ENV_CORE" | sudo tee -a /etc/sysctl.conf
8897fi
8998
99+# Check if CPU supports AES-NI
100+cpuid | grep -i aes > hw-aes.txt
101+if grep -q true "hw-aes.txt"; then
102+ _AES_NI=true
103+else
104+ _AES_NI=false
105+fi
106+rm hw-aes.txt
107+
90108# Run apt maintenance
91109_APT_MAINETANCE="1"
92110