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