git.iko.soy/xmrig-autoinstall
on main help sign in
4 files changed+54−28
since splitsnapshots
unifiedsplit
.config+8−7 README.md+33−5 hiveos-xmrig-installer.sh+6−8 xmrig-installer.sh+7−8
.config+8−7
@@ -1,20 +1,21 @@
11# CHANGE BELOW!
22
3−INSTALL_DIR="/opt/xmrig/"
3+export INSTALL_DIR="/opt"
4+export DIR_NAME="xmrig"
45
56# USE --coin <coin> OR CHANGE TO --algo <algo>
67export POOL_COIN="--coin monero"
78
89# Enable TLS by removing '#' - Disable TLS by prepending '#' or skipping
9−#export POOL_TLS="--tls"
10+export POOL_TLS="--tls"
1011
11−export POOL_HOST=gulf.moneroocean.stream
12−export POOL_PORT=10001
13−export POOL_USER=MY_MONERO_ADDRESS
14−export POOL_PASS=MY_POOL_PASS
12+export POOL_HOST=xmrpool.eu
13+export POOL_PORT=9999
14+export POOL_USER=44FADBDhNRvjJszF5mLS4VCwZ71mY7ftfUErEisPoT724hb5eYuvuFqWthniY8dGPBTcWuBoeLrLJVkxLHCb1Lsd4DdbZzZ
15+export POOL_PASS=
1516
1617# Enable LOGGING by removing '#' - Disable LOGGING by prepending '#' or skipping
17−export POOL_LOG="--log-file=/var/log/xmrig.log"
18+# export POOL_LOG="--log-file=/var/log/xmrig.log"
1819
1920
2021# THIS IS WHICH GIT SOURCE TO COMPILE. ADVANCED USERS CAN CHANGE THIS AND MODIFY INSTALL SCRIPTS FOR REQUIRED PACKAGES (RTFM)
README.md+33−5
@@ -8,16 +8,14 @@ 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−Script can be re-run with new parameters but it will delete XMRig and re-git/compile.
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.
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−
2119### Features
2220- Auto-Build XMRig (MoneroOcean version)
2321- Auto-Create XMRig Service
@@ -57,6 +55,24 @@ chmod +x *.sh
5755
5856```
5957
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+
6076### Update Git Sources (scripts)
6177Probably do this weekly for now until main parts of these scripts are done. Will add auto-update script repos in future.
6278You must manually initiate the installation/reconfiguration scripts.
@@ -74,4 +90,16 @@ git pull
7490
7591Yes there will be an uninstall script ... eventually :)
7692
77−~ BlockChasers.ca
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
hiveos-xmrig-installer.sh+6−8
@@ -12,17 +12,15 @@ apt install -y dialog logrotate ntp ntpdate cpulimit ${APT_REQ_PKGS} ;
1212
1313echo "CREATING DIRECTORIES"
1414
15−cd /root/
16−
17−mkdir MINERS
18−cd MINERS
15+mkdir -p ${INSTALL_DIR}
16+cd ${INSTALL_DIR}
1917
2018echo "CLONING XMRIG"
2119
22−rm -rf xmrig
23−git clone ${GIT_SRC_URL}
20+rm -rf ${DIR_NAME}
21+git clone ${GIT_SRC_URL} ${DIR_NAME}
2422
25−cd xmrig
23+cd ${DIR_NAME}
2624
2725echo "CMAKE XMRIG"
2826
@@ -53,7 +51,7 @@ echo "Type=simple" | tee -a /etc/systemd/system/xmrig.service
5351echo "Restart=always" | tee -a /etc/systemd/system/xmrig.service
5452echo "RestartSec=3" | tee -a /etc/systemd/system/xmrig.service
5553echo "User=root" | 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
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
5755echo "" | tee -a /etc/systemd/system/xmrig.service
5856echo "[Install]" | tee -a /etc/systemd/system/xmrig.service
5957echo "WantedBy=multi-user.target" | tee -a /etc/systemd/system/xmrig.service
xmrig-installer.sh+7−8
@@ -1,3 +1,4 @@
1+source .config
12
23echo "UPDATE / UPGRADE"
34
@@ -11,17 +12,15 @@ apt install -y dialog logrotate ntp ntpdate cpulimit ${APT_REQ_PKGS} ;
1112
1213echo "CREATING DIRECTORIES"
1314
14−cd /root/
15−
16−mkdir MINERS
17−cd MINERS
15+mkdir -p ${INSTALL_DIR}
16+cd ${INSTALL_DIR}
1817
1918echo "CLONING XMRIG"
2019
21−rm -rf xmrig
22−git clone ${GIT_SRC_URL}
20+rm -rf ${DIR_NAME}
21+git clone ${GIT_SRC_URL} ${DIR_NAME}
2322
24−cd xmrig
23+cd ${DIR_NAME}
2524
2625echo "CMAKE XMRIG"
2726
@@ -48,7 +47,7 @@ echo "Type=simple" | tee -a /etc/systemd/system/xmrig.service
4847echo "Restart=always" | tee -a /etc/systemd/system/xmrig.service
4948echo "RestartSec=3" | tee -a /etc/systemd/system/xmrig.service
5049echo "User=root" | 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
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
5251echo "" | tee -a /etc/systemd/system/xmrig.service
5352echo "[Install]" | tee -a /etc/systemd/system/xmrig.service
5453echo "WantedBy=multi-user.target" | tee -a /etc/systemd/system/xmrig.service