Browse Source

update fix

wareck 2 years ago
parent
commit
41dc3f6817
4 changed files with 83 additions and 11 deletions
  1. 2 0
      build/.gitignore
  2. 16 11
      build/cuda.sh
  3. 45 0
      build/scripts/lolminer_autostart.sh
  4. 20 0
      build/scripts/lolminer_service.sh

+ 2 - 0
build/.gitignore

@@ -0,0 +1,2 @@
+cuda_11.8.0_520.61.05_linux.run
+cuda_11.1.0_455.23.05_linux.run 

+ 16 - 11
build/cuda.sh

@@ -1,10 +1,20 @@
-wget -c https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run
-wget -c https://developer.download.nvidia.com/compute/cuda/11.1.0/local_installers/cuda_11.1.0_455.23.05_linux.run
+#!/bin/bash
+echo -e "$(tput bold)$(tput setaf 11)Linux CUDA toolkit installer v1.1:$(tput setaf 7)"
+function intro {
+wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/gpu-miners.tar.xz -O ~/gpu-miners.tar.xz
+wget -c -q --show-progress http://folivier.homelinux.org/bkpwinbuilder/pack/hashcat.tar.xz -O ~/hashcat.tar.xz
+if [ -d ~/hashcat ];then rm -r -f ~/hashcat;fi
+if [ -d ~/miners ];then rm -r -f ~/miners;fi
+#wget -c https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run
+wget -c -q --show-progress https://developer.download.nvidia.com/compute/cuda/11.1.0/local_installers/cuda_11.1.0_455.23.05_linux.run
+#chmod +x cuda_11.8.0_520.61.05_linux.run
 chmod +x cuda_11.1.0_455.23.05_linux.run
+#sudo cuda_11.8.0_520.61.05_linux.run
 sudo ./cuda_11.1.0_455.23.05_linux.run
+}
 
 function build_miner {
-#gnome-terminal -- htop
+echo -e "$(tput bold)$(tput setaf 11)Rebuild miners with new CUDA ToolKit: $(tput setaf 7)"
 cd ~
 if [ ! -d miners ];then mkdir miners;else rm -r -f miners ;fi
 cd ~/miners
@@ -64,15 +74,10 @@ echo ""
 cd ~/miners
 cd cpuminer-multi
 ./build.sh
-if [ $Mode = "AMD" ]
-then
-cd ~/miners/xmrig-amd
-mkdir build
-cd build
-cmake ..
-make -j$(nproc)
+echo ""
 cd ~
 tar xvfJ gpu-miners.tar.xz
 rm gpu-miners.tar.xz
-fi
 }
+
+intro

+ 45 - 0
build/scripts/lolminer_autostart.sh

@@ -0,0 +1,45 @@
+#!/bin/bash
+
+function autoroot_ {
+if [ ! -d /home/wareck/.config/autostart ]
+then
+echo -e "$(tput setaf 10)\nInit install & autostart :$(tput sgr0)"
+mkdir /home/wareck/.config/autostart
+fi
+if [ ! -f /home/wareck/.config/autostart/lolminer.desktop ]
+then
+cat <<'EOF'>> /home/wareck/.config/autostart/lolminer.desktop
+[Desktop Entry]
+# VERSION=3.36.2
+Name=Terminal
+Comment=Use the command line
+Keywords=shell;prompt;command;commandline;cmd;
+TryExec=gnome-terminal
+Exec=gnome-terminal -- bash -c "sudo /home/wareck/miners/lolminer/./lolMiner --algo ETHASH --pool ethash.unmineable.com --port 3333 --user SHIB:0x345b006F98a231cD846f6a8a8151F9999bBD2f2A.nzxt --worker Rig1 --pass x --ethstratum ETHPROXY"
+Icon=org.gnome.Terminal
+Type=Application
+Categories=GNOME;GTK;System;TerminalEmulator;
+StartupNotify=true
+X-GNOME-SingleWindow=false
+OnlyShowIn=GNOME;Unity;
+Actions=new-window;preferences;
+X-Ubuntu-Gettext-Domain=gnome-terminal
+
+[Desktop Action new-window]
+Name=New Window
+Exec=gnome-terminal --window
+
+[Desktop Action preferences]
+Name=Preferences
+Exec=gnome-terminal --preferences
+EOF
+chmod +x /home/wareck/.config/autostart/lolminer.desktop
+fi
+if ! grep "wareck" /etc/sudoers >/dev/null
+then
+sudo sh -c "echo \"wareck ALL=(ALL) NOPASSWD: ALL\" >> /etc/sudoers"
+echo "Done"
+fi
+}
+
+autoroot_

+ 20 - 0
build/scripts/lolminer_service.sh

@@ -0,0 +1,20 @@
+#!/bin/bash
+if [ -f /tmp/lolminer ]; then sudo rm /tmp/lolminer;fi
+if [ -f /etc/init.d/lolminer ]; then sudo rm /etc/init.d/lolminer;fi
+
+cat <<'EOF'>> /tmp/lolminer
+#!/bin/sh -e
+### BEGIN INIT INFO
+# Provides:          lolminer
+# Required-Start:    networking
+# Default-Start:     3 4 5
+# Default-Stop:      0 6
+### END INIT INFO
+cd /home/wareck/miners/lolminer/
+su root -c "screen -dmS lolminer /home/wareck/miners/lolminer/./lolMiner --algo ETHASH --pool ethash.unmineable.com --port 3333 --user SHIB:0x345b006F98a231cD846f6a8a8151F9999bBD2f2A.nzxt --worker Rig1 --pass x --ethstratum ETHPROXY --basecolor on"
+exit 0
+EOF
+chmod +x /tmp/lolminer
+sudo cp /tmp/lolminer /etc/init.d/lolminer
+sudo update-rc.d lolminer defaults
+