mirror of
https://github.com/ilyakooo0/xmrig-autoinstall.git
synced 2024-11-22 19:02:31 +03:00
Hive OS Specific Installer
This commit is contained in:
parent
d87a83cbc2
commit
24aeb8fbc4
66
hiveos-xmrig-installer.sh
Normal file
66
hiveos-xmrig-installer.sh
Normal file
@ -0,0 +1,66 @@
|
||||
echo "UPDATE / UPGRADE"
|
||||
|
||||
apt update
|
||||
|
||||
apt upgrade -y ; apt dist-upgrade -y ;
|
||||
|
||||
echo "INSTALLING REQ'D PACKAGES"
|
||||
|
||||
# libssl-dev (REMOVED FOR HIVEOS ONLY)
|
||||
|
||||
apt install -y htop cpulimit git build-essential cmake libuv1-dev libhwloc-dev automake libtool autoconf ;
|
||||
|
||||
echo "CREATING DIRECTORIES"
|
||||
|
||||
cd /root/
|
||||
|
||||
mkdir MINERS
|
||||
cd MINERS
|
||||
|
||||
echo "CLONING XMRIG"
|
||||
|
||||
git clone https://github.com/MoneroOcean/xmrig.git
|
||||
|
||||
cd xmrig
|
||||
|
||||
echo "CMAKE XMRIG"
|
||||
|
||||
# TLS OFF FOR HIVEOS ONLY
|
||||
|
||||
cmake ./ -DWITH_TLS=OFF
|
||||
|
||||
echo "MAKE XMRIG"
|
||||
|
||||
make
|
||||
|
||||
move xmrig-notls xmrig
|
||||
|
||||
chmod +x xmrig
|
||||
|
||||
echo "INSTALLING XMRIG SERVICE"
|
||||
|
||||
export $HOSTNAME=$(cat /etc/hostname)
|
||||
|
||||
echo "HOSTNAME IS [ ${HOSTNAME} ]"
|
||||
|
||||
echo "[Unit]" | tee /etc/systemd/system/xmrig.service
|
||||
echo "Description=XMRIG service" | tee -a /etc/systemd/system/xmrig.service
|
||||
echo "After=network.target" | tee -a /etc/systemd/system/xmrig.service
|
||||
echo "StartLimitIntervalSec=0" | tee -a /etc/systemd/system/xmrig.service
|
||||
echo "[Service]" | tee -a /etc/systemd/system/xmrig.service
|
||||
echo "Type=simple" | tee -a /etc/systemd/system/xmrig.service
|
||||
echo "Restart=always" | tee -a /etc/systemd/system/xmrig.service
|
||||
echo "RestartSec=3" | tee -a /etc/systemd/system/xmrig.service
|
||||
echo "User=root" | tee -a /etc/systemd/system/xmrig.service
|
||||
echo "ExecStart=/root/MINERS/xmrig/xmrig --coin monero -o 192.168.0.52:33333 -u ${HOSTNAME} -p ${HOSTNAME} --log-file=/var/log/xmrig.log --donate-level=0" | tee -a /etc/systemd/system/xmrig.service
|
||||
echo "" | tee -a /etc/systemd/system/xmrig.service
|
||||
echo "[Install]" | tee -a /etc/systemd/system/xmrig.service
|
||||
echo "WantedBy=multi-user.target" | tee -a /etc/systemd/system/xmrig.service
|
||||
|
||||
echo "STARTING XMRIG SERVICE"
|
||||
|
||||
service xmrig start
|
||||
|
||||
echo "STARTING XMRIG SERVICE @ BOOT"
|
||||
|
||||
systemctl enable xmrig
|
Loading…
Reference in New Issue
Block a user