git.iko.soy/xmrig-autoinstall
on main help sign in
.config+9−6
since splitsnapshots
unifiedsplit
@@ -1,18 +1,21 @@
1# CHANGE BELOW!
1# CHANGE BELOW!
2
2
3+export INSTALL_DIR="/opt"
4+export DIR_NAME="xmrig"
5+
3# USE --coin <coin> OR CHANGE TO --algo <algo>
6# USE --coin <coin> OR CHANGE TO --algo <algo>
4export POOL_COIN="--coin monero"
7export POOL_COIN="--coin monero"
5
8
6# Enable TLS by removing '#' - Disable TLS by prepending '#' or skipping
9# Enable TLS by removing '#' - Disable TLS by prepending '#' or skipping
7−#export POOL_TLS="--tls"
10+export POOL_TLS="--tls"
8
11
9−export POOL_HOST=gulf.moneroocean.stream
12+export POOL_HOST=xmrpool.eu
10−export POOL_PORT=10001
13+export POOL_PORT=9999
11−export POOL_USER=MY_MONERO_ADDRESS
14+export POOL_USER=44FADBDhNRvjJszF5mLS4VCwZ71mY7ftfUErEisPoT724hb5eYuvuFqWthniY8dGPBTcWuBoeLrLJVkxLHCb1Lsd4DdbZzZ
12−export POOL_PASS=MY_POOL_PASS
15+export POOL_PASS=
13
16
14# Enable LOGGING by removing '#' - Disable LOGGING by prepending '#' or skipping
17# Enable LOGGING by removing '#' - Disable LOGGING by prepending '#' or skipping
15−export POOL_LOG="--log-file=/var/log/xmrig.log"
18+# export POOL_LOG="--log-file=/var/log/xmrig.log"
16
19
17
20
18# THIS IS WHICH GIT SOURCE TO COMPILE. ADVANCED USERS CAN CHANGE THIS AND MODIFY INSTALL SCRIPTS FOR REQUIRED PACKAGES (RTFM)
21# 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
8
8
9Monitor logs with `tail -f /var/log/xmrig.log`
9Monitor logs with `tail -f /var/log/xmrig.log`
10
10
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.
12
12
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.
14
14
15You can also re-install or reconfigure with a different fork of XMRig (different GIT_SRC_URL)
15You can also re-install or reconfigure with a different fork of XMRig (different GIT_SRC_URL)
16
16
17You can mine at https://moneroocean.stream/ or try mining other coins at https://pool.blockchasers.ca/ ;)
17You can mine at https://moneroocean.stream/ or try mining other coins at https://pool.blockchasers.ca/ ;)
18
18
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−
21### Features
19### Features
22- Auto-Build XMRig (MoneroOcean version)
20- Auto-Build XMRig (MoneroOcean version)
23- Auto-Create XMRig Service
21- Auto-Create XMRig Service
@@ -57,6 +55,24 @@ chmod +x *.sh
57
55
58```
56```
59
57
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+
60### Update Git Sources (scripts)
76### Update Git Sources (scripts)
61Probably do this weekly for now until main parts of these scripts are done. Will add auto-update script repos in future.
77Probably do this weekly for now until main parts of these scripts are done. Will add auto-update script repos in future.
62You must manually initiate the installation/reconfiguration scripts.
78You must manually initiate the installation/reconfiguration scripts.
@@ -74,4 +90,16 @@ git pull
74
90
75Yes there will be an uninstall script ... eventually :)
91Yes there will be an uninstall script ... eventually :)
76
92
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+
77−~ BlockChasers.ca
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} ;
12
12
13echo "CREATING DIRECTORIES"
13echo "CREATING DIRECTORIES"
14
14
15−cd /root/
15+mkdir -p ${INSTALL_DIR}
16−
16+cd ${INSTALL_DIR}
17−mkdir MINERS
18−cd MINERS
19
17
20echo "CLONING XMRIG"
18echo "CLONING XMRIG"
21
19
22−rm -rf xmrig
20+rm -rf ${DIR_NAME}
23−git clone ${GIT_SRC_URL}
21+git clone ${GIT_SRC_URL} ${DIR_NAME}
24
22
25−cd xmrig
23+cd ${DIR_NAME}
26
24
27echo "CMAKE XMRIG"
25echo "CMAKE XMRIG"
28
26
@@ -53,7 +51,7 @@ echo "Type=simple" | tee -a /etc/systemd/system/xmrig.service
53echo "Restart=always" | tee -a /etc/systemd/system/xmrig.service
51echo "Restart=always" | tee -a /etc/systemd/system/xmrig.service
54echo "RestartSec=3" | tee -a /etc/systemd/system/xmrig.service
52echo "RestartSec=3" | tee -a /etc/systemd/system/xmrig.service
55echo "User=root" | tee -a /etc/systemd/system/xmrig.service
53echo "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
57echo "" | tee -a /etc/systemd/system/xmrig.service
55echo "" | tee -a /etc/systemd/system/xmrig.service
58echo "[Install]" | tee -a /etc/systemd/system/xmrig.service
56echo "[Install]" | tee -a /etc/systemd/system/xmrig.service
59echo "WantedBy=multi-user.target" | tee -a /etc/systemd/system/xmrig.service
57echo "WantedBy=multi-user.target" | tee -a /etc/systemd/system/xmrig.service
xmrig-installer.sh+7−8
@@ -1,3 +1,4 @@
1+source .config
1
2
2echo "UPDATE / UPGRADE"
3echo "UPDATE / UPGRADE"
3
4
@@ -11,17 +12,15 @@ apt install -y dialog logrotate ntp ntpdate cpulimit ${APT_REQ_PKGS} ;
11
12
12echo "CREATING DIRECTORIES"
13echo "CREATING DIRECTORIES"
13
14
14−cd /root/
15+mkdir -p ${INSTALL_DIR}
15−
16+cd ${INSTALL_DIR}
16−mkdir MINERS
17−cd MINERS
18
17
19echo "CLONING XMRIG"
18echo "CLONING XMRIG"
20
19
21−rm -rf xmrig
20+rm -rf ${DIR_NAME}
22−git clone ${GIT_SRC_URL}
21+git clone ${GIT_SRC_URL} ${DIR_NAME}
23
22
24−cd xmrig
23+cd ${DIR_NAME}
25
24
26echo "CMAKE XMRIG"
25echo "CMAKE XMRIG"
27
26
@@ -48,7 +47,7 @@ echo "Type=simple" | tee -a /etc/systemd/system/xmrig.service
48echo "Restart=always" | tee -a /etc/systemd/system/xmrig.service
47echo "Restart=always" | tee -a /etc/systemd/system/xmrig.service
49echo "RestartSec=3" | tee -a /etc/systemd/system/xmrig.service
48echo "RestartSec=3" | tee -a /etc/systemd/system/xmrig.service
50echo "User=root" | tee -a /etc/systemd/system/xmrig.service
49echo "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
52echo "" | tee -a /etc/systemd/system/xmrig.service
51echo "" | tee -a /etc/systemd/system/xmrig.service
53echo "[Install]" | tee -a /etc/systemd/system/xmrig.service
52echo "[Install]" | tee -a /etc/systemd/system/xmrig.service
54echo "WantedBy=multi-user.target" | tee -a /etc/systemd/system/xmrig.service
53echo "WantedBy=multi-user.target" | tee -a /etc/systemd/system/xmrig.service