git.iko.soy/xmrig-autoinstall
on 591ebd5 help sign in
4 files changed+27−55
since splitsnapshots
unifiedsplit
.config+6−9 README.md+5−33 hiveos-xmrig-installer.sh+8−6 xmrig-installer.sh+8−7
.config+6−9
@@ -1,21 +1,18 @@
11# CHANGE BELOW!
22
3−export INSTALL_DIR="/opt"
4−export DIR_NAME="xmrig"
5−
63# USE --coin <coin> OR CHANGE TO --algo <algo>
74export POOL_COIN="--coin monero"
85
96# Enable TLS by removing '#' - Disable TLS by prepending '#' or skipping
10−export POOL_TLS="--tls"
7+#export POOL_TLS="--tls"
118
12−export POOL_HOST=xmrpool.eu
13−export POOL_PORT=9999
14−export POOL_USER=44FADBDhNRvjJszF5mLS4VCwZ71mY7ftfUErEisPoT724hb5eYuvuFqWthniY8dGPBTcWuBoeLrLJVkxLHCb1Lsd4DdbZzZ
15−export POOL_PASS=
9+export POOL_HOST=gulf.moneroocean.stream
10+export POOL_PORT=10001
11+export POOL_USER=MY_MONERO_ADDRESS
12+export POOL_PASS=MY_POOL_PASS
1613
1714# Enable LOGGING by removing '#' - Disable LOGGING by prepending '#' or skipping
18−# export POOL_LOG="--log-file=/var/log/xmrig.log"
15+export POOL_LOG="--log-file=/var/log/xmrig.log"
1916
2017
2118# THIS IS WHICH GIT SOURCE TO COMPILE. ADVANCED USERS CAN CHANGE THIS AND MODIFY INSTALL SCRIPTS FOR REQUIRED PACKAGES (RTFM)
README.md+5−33
@@ -8,14 +8,16 @@ This script was initially hacked for HiveOS as it will overwrite/uninstall XMRig
88
99Monitor logs with `tail -f /var/log/xmrig.log`
1010
11−You may keep the script in place and it can be re-run with new configuration but it will delete XMRig and re-git/compile.
11+Script can be re-run with new parameters but it will delete XMRig and re-git/compile.
1212
13−You must initiate these re-compiles manually, to update the XMRig according to their update schedule.
13+You must initiate these re-compiles manually, to update the XMRig according to their update schedule.
1414
1515You can also re-install or reconfigure with a different fork of XMRig (different GIT_SRC_URL)
1616
1717You can mine at https://moneroocean.stream/ or try mining other coins at https://pool.blockchasers.ca/ ;)
1818
19+**WARNING: The script currently installs the XMRIG to /root/MINERS/xmrig.** This is a side effect from running on my own machines, and the script being under development. I will fix this tomorrow to install to system directory hidden away somewhere ;)
20+
1921### Features
2022- Auto-Build XMRig (MoneroOcean version)
2123- Auto-Create XMRig Service
@@ -55,24 +57,6 @@ chmod +x *.sh
5557
5658```
5759
58−The following is an example how to re-run the script to re-configure/re-compile:
59−```
60−# CHANGE TO DIR WHERE YOU INSTALLED SCRIPTS
61−cd /home/USER/somedir/
62−cd xmrig-autoinstall
63−
64−nano .config
65−
66−source .config
67−
68−# RUN THIS TO INSTALL XMRIG (GENERAL)
69−./xmrig-installer.sh
70−
71−# RUN THIS TO INSTALL XMRIG (HIVEOS - RUN IN HIVE SHELL)
72−./hiveos-xmrig-installer.sh
73−
74−```
75−
7660### Update Git Sources (scripts)
7761Probably do this weekly for now until main parts of these scripts are done. Will add auto-update script repos in future.
7862You must manually initiate the installation/reconfiguration scripts.
@@ -90,16 +74,4 @@ git pull
9074
9175Yes there will be an uninstall script ... eventually :)
9276
93−**Plz buy me coffee?**
94−
95−**BTC:** bc1q859l5w74l276y96h30rv3sl7p3tvalrxsfa5h3<br />
96−**LTC:** LLtgfUUNh6LKKSuUbZJe2CFuVwjG8ES9zt<br />
97−**DOGE:** DS7an4H1FxPRPbN5LrUhQ7VzuGiHC5unaZ<br />
98−**ETH/ERC-20:** 0x14Cc36Dd9078A0E1Bd8026f735580fe548BAb709<br />
99−**BNB/BEP-20:** bnb1h573j7yx4k45kz7u8psws3g4tacr34g8rwmvm8<br />
100−**TRX/TRC-20:** TWHEVqjALbMG7RQxJLc4oWrNzqwviN8UX5<br />
101−**XMR:** 43aRmqLF6kaGqwh3qGxMgpYaWBxAXxFAnZabCouZyRrR1gLyi29YCUxdCTtRJjiBKB2sBUkRjynUA9D2fRFL7tiE7iyftmY<br />
102−
103−### ~ BlockChasers.ca
104−
105−EOF
77+~ BlockChasers.ca
hiveos-xmrig-installer.sh+8−6
@@ -12,15 +12,17 @@ apt install -y dialog logrotate ntp ntpdate cpulimit ${APT_REQ_PKGS} ;
1212
1313echo "CREATING DIRECTORIES"
1414
15−mkdir -p ${INSTALL_DIR}
16−cd ${INSTALL_DIR}
15+cd /root/
16+
17+mkdir MINERS
18+cd MINERS
1719
1820echo "CLONING XMRIG"
1921
20−rm -rf ${DIR_NAME}
21−git clone ${GIT_SRC_URL} ${DIR_NAME}
22+rm -rf xmrig
23+git clone ${GIT_SRC_URL}
2224
23−cd ${DIR_NAME}
25+cd xmrig
2426
2527echo "CMAKE XMRIG"
2628
@@ -51,7 +53,7 @@ echo "Type=simple" | tee -a /etc/systemd/system/xmrig.service
5153echo "Restart=always" | tee -a /etc/systemd/system/xmrig.service
5254echo "RestartSec=3" | tee -a /etc/systemd/system/xmrig.service
5355echo "User=root" | tee -a /etc/systemd/system/xmrig.service
54−echo "ExecStart=${INSTALL_DIR}/${DIR_NAME}/xmrig ${POOL_COIN} ${POOL_TLS} -o ${POOL_HOST}:${POOL_PORT} -u ${POOL_USER} -p ${POOL_PASS} ${POOL_LOG} --donate-level=0" | tee -a /etc/systemd/system/xmrig.service
56+echo "ExecStart=/root/MINERS/xmrig/xmrig ${POOL_COIN} ${POOL_TLS} -o ${POOL_HOST}:${POOL_PORT} -u ${POOL_USER} -p ${POOL_PASS} ${POOL_LOG} --donate-level=0" | tee -a /etc/systemd/system/xmrig.service
5557echo "" | tee -a /etc/systemd/system/xmrig.service
5658echo "[Install]" | tee -a /etc/systemd/system/xmrig.service
5759echo "WantedBy=multi-user.target" | tee -a /etc/systemd/system/xmrig.service
xmrig-installer.sh+8−7
@@ -1,4 +1,3 @@
1−source .config
21
32echo "UPDATE / UPGRADE"
43
@@ -12,15 +11,17 @@ apt install -y dialog logrotate ntp ntpdate cpulimit ${APT_REQ_PKGS} ;
1211
1312echo "CREATING DIRECTORIES"
1413
15−mkdir -p ${INSTALL_DIR}
16−cd ${INSTALL_DIR}
14+cd /root/
15+
16+mkdir MINERS
17+cd MINERS
1718
1819echo "CLONING XMRIG"
1920
20−rm -rf ${DIR_NAME}
21−git clone ${GIT_SRC_URL} ${DIR_NAME}
21+rm -rf xmrig
22+git clone ${GIT_SRC_URL}
2223
23−cd ${DIR_NAME}
24+cd xmrig
2425
2526echo "CMAKE XMRIG"
2627
@@ -47,7 +48,7 @@ echo "Type=simple" | tee -a /etc/systemd/system/xmrig.service
4748echo "Restart=always" | tee -a /etc/systemd/system/xmrig.service
4849echo "RestartSec=3" | tee -a /etc/systemd/system/xmrig.service
4950echo "User=root" | tee -a /etc/systemd/system/xmrig.service
50−echo "ExecStart=${INSTALL_DIR}/${DIR_NAME}/xmrig ${POOL_COIN} ${POOL_TLS} -o ${POOL_HOST}:${POOL_PORT} -u ${POOL_USER} -p ${POOL_PASS} ${POOL_LOG} --donate-level=0" | tee -a /etc/systemd/system/xmrig.service
51+echo "ExecStart=/root/MINERS/xmrig/xmrig ${POOL_COIN} ${POOL_TLS} -o ${POOL_HOST}:${POOL_PORT} -u ${POOL_USER} -p ${POOL_PASS} ${POOL_LOG} --donate-level=0" | tee -a /etc/systemd/system/xmrig.service
5152echo "" | tee -a /etc/systemd/system/xmrig.service
5253echo "[Install]" | tee -a /etc/systemd/system/xmrig.service
5354echo "WantedBy=multi-user.target" | tee -a /etc/systemd/system/xmrig.service