|
@@ -1,19 +1,12 @@
|
|
|
#!/bin/bash
|
|
|
function choice {
|
|
|
-if ! [ -f /home/wareck/.pass1 ]
|
|
|
-then
|
|
|
echo -e "Linux backup/miner config v3.0 "
|
|
|
echo -e ""
|
|
|
-if [ -f ~/b10.conf ]; then rm ~/b10.conf ; fi
|
|
|
PS3='Please enter your choice: '
|
|
|
-options=("NVIDIA-RTX-LHR" "NVIDIA-RTX" "NVIDIA-GTX" "AMD" "Quit")
|
|
|
+options=("NVIDIA-RTX" "NVIDIA-GTX" "AMD" "Quit")
|
|
|
select opt in "${options[@]}"
|
|
|
do
|
|
|
case $opt in
|
|
|
- "NVIDIA-RTX-LHR")
|
|
|
- Mode="NVIDIALHR"
|
|
|
- break
|
|
|
- ;;
|
|
|
"NVIDIA-RTX")
|
|
|
Mode="NVIDIARTX"
|
|
|
break
|
|
@@ -33,18 +26,10 @@ do
|
|
|
*) echo "invalid option $REPLY";;
|
|
|
esac
|
|
|
done
|
|
|
-cat <<'EOF'>> ~/b10.conf
|
|
|
-Mode=XXX
|
|
|
-EOF
|
|
|
-sed -i "s/XXX/$Mode/g" ~/b10.conf
|
|
|
-touch ~/.pass1
|
|
|
-fi
|
|
|
echo -e ""
|
|
|
}
|
|
|
|
|
|
function update_one {
|
|
|
-if ! [ -f /home/wareck/.pass2 ]
|
|
|
-then
|
|
|
sudo timedatectl set-local-rtc 1 --adjust-system-clock
|
|
|
sudo apt-get update -y
|
|
|
sudo apt-get upgrade -y
|
|
@@ -57,20 +42,19 @@ cp ~/backup_users_win10/build/hashcat.tar.xz /home/wareck/
|
|
|
cd /home/wareck/
|
|
|
tar xvfJ wallpaper.tar.xz
|
|
|
sudo rm wallpaper.tar.xz
|
|
|
-touch ~/.pass2
|
|
|
-fi
|
|
|
echo -n ""
|
|
|
}
|
|
|
|
|
|
function update_two {
|
|
|
-if [ $Mode = "NVIDIAGTX" ]
|
|
|
+if [ $Mode = "NVIDIAGTX" ] || [ $Mode = "NVIDIARTX" ]
|
|
|
then
|
|
|
sudo apt install nvidia-cuda-toolkit nvidia-cuda-dev nvidia-driver-470 -y
|
|
|
+touch ~/.rtx
|
|
|
fi
|
|
|
-if [ $Mode = "NVIDIARTX" ]
|
|
|
-then
|
|
|
-sudo apt install nvidia-cuda-toolkit nvidia-cuda-dev nvidia-driver-510 -y
|
|
|
-fi
|
|
|
+#if [ $Mode = "NVIDIARTX" ]
|
|
|
+#then
|
|
|
+#sudo apt install nvidia-cuda-toolkit nvidia-cuda-dev nvidia-driver-510 -y
|
|
|
+#fi
|
|
|
if [ $Mode = "AMD" ]
|
|
|
then
|
|
|
cd /home/wareck
|
|
@@ -102,7 +86,7 @@ echo ""
|
|
|
git clone https://github.com/tpruvot/ccminer.git && echo ""
|
|
|
git clone https://github.com/tpruvot/cpuminer-multi.git && echo ""
|
|
|
git clone https://github.com/xmrig/xmrig.git && echo ""
|
|
|
-if [ $Mode = "NVIDIAGTX" ] || [ $Mode = "NVIDIARTX" ] || [ $Mode = "NVIDIALHR" ]
|
|
|
+if [ $Mode = "NVIDIAGTX" ] || [ $Mode = "NVIDIARTX" ]
|
|
|
then
|
|
|
git clone https://github.com/xmrig/xmrig-nvidia.git && echo ""
|
|
|
fi
|
|
@@ -131,7 +115,7 @@ cd build
|
|
|
cmake ..
|
|
|
make -j$(nproc)
|
|
|
cd ~/miners
|
|
|
-if [ $Mode = "NVIDIAGTX" ] || [ $Mode = "NVIDIARTX" ] || [ $Mode = "NVIDIALHR" ]
|
|
|
+if [ $Mode = "NVIDIAGTX" ] || [ $Mode = "NVIDIARTX" ]
|
|
|
then
|
|
|
cd xmrig-nvidia
|
|
|
cd build
|
|
@@ -184,7 +168,7 @@ sudo mv wakeup_cube.sh /usr/local/bin
|
|
|
}
|
|
|
|
|
|
function liquidcontrol {
|
|
|
-if [ $Mode = "NVIDIAGTX" ] || [ $Mode = "NVIDIARTX" ] || [ $Mode = "NVIDIALHR" ]
|
|
|
+if [ $Mode = "NVIDIAGTX" ] || [ $Mode = "NVIDIARTX" ]
|
|
|
then
|
|
|
sudo pip3 install liquidctl
|
|
|
fi
|
|
@@ -238,7 +222,7 @@ sudo rm zap2
|
|
|
bash -c /usr/local/bin/zap
|
|
|
fi
|
|
|
|
|
|
-if [ $Mode = "NVIDIARTX" ] || [ $Mode = "NVIDIALHR" ]
|
|
|
+if [ $Mode = "NVIDIARTX" ]
|
|
|
then
|
|
|
cat <<'EOF'>> liquidcfg.service
|
|
|
[Unit]
|
|
@@ -263,11 +247,57 @@ sudo systemctl start liquidcfg
|
|
|
sudo systemctl enable liquidcfg
|
|
|
gsettings set org.gnome.desktop.background picture-uri /home/wareck/Images/875469.png
|
|
|
gsettings set org.gnome.shell.extensions.dash-to-dock dash-max-icon-size 32
|
|
|
+cat <<'EOF'>> zap
|
|
|
+#!/bin/bash
|
|
|
+dconf load /org/gnome/terminal/ < /usr/local/bin/zap2
|
|
|
+EOF
|
|
|
+sed -i "s/XXX/$zip/g" zap
|
|
|
+UUID=$(gsettings get org.gnome.Terminal.ProfilesList default | tr -d \')
|
|
|
+cat <<'EOF'>> zap2
|
|
|
+[legacy/profiles:/:XXX]
|
|
|
+default-size-columns=110
|
|
|
+font='Monospace 9'
|
|
|
+use-system-font=false
|
|
|
+use-theme-colors=false
|
|
|
+background-color='rgb(0,0,0)'
|
|
|
+background-transparency-percent=8
|
|
|
+EOF
|
|
|
+sed -i "s/XXX/$UUID/g" zap2
|
|
|
+chmod +x zap
|
|
|
+sudo cp zap /usr/local/bin
|
|
|
+sudo cp zap2 /usr/local/bin
|
|
|
+sudo rm zap
|
|
|
+sudo rm zap2
|
|
|
+bash -c /usr/local/bin/zap
|
|
|
fi
|
|
|
+
|
|
|
+
|
|
|
if [ $Mode = "AMD" ]
|
|
|
then
|
|
|
gsettings set org.gnome.desktop.background picture-uri /home/wareck/Images/wallpaperAMD.jpg
|
|
|
gsettings set org.gnome.shell.extensions.dash-to-dock dash-max-icon-size 32
|
|
|
+cat <<'EOF'>> zap
|
|
|
+#!/bin/bash
|
|
|
+dconf load /org/gnome/terminal/ < /usr/local/bin/zap2
|
|
|
+EOF
|
|
|
+sed -i "s/XXX/$zip/g" zap
|
|
|
+UUID=$(gsettings get org.gnome.Terminal.ProfilesList default | tr -d \')
|
|
|
+cat <<'EOF'>> zap2
|
|
|
+[legacy/profiles:/:XXX]
|
|
|
+default-size-columns=110
|
|
|
+font='Monospace 9'
|
|
|
+use-system-font=false
|
|
|
+use-theme-colors=false
|
|
|
+background-color='rgb(0,0,0)'
|
|
|
+background-transparency-percent=8
|
|
|
+EOF
|
|
|
+sed -i "s/XXX/$UUID/g" zap2
|
|
|
+chmod +x zap
|
|
|
+sudo cp zap /usr/local/bin
|
|
|
+sudo cp zap2 /usr/local/bin
|
|
|
+sudo rm zap
|
|
|
+sudo rm zap2
|
|
|
+bash -c /usr/local/bin/zap
|
|
|
fi
|
|
|
}
|
|
|
|
|
@@ -286,14 +316,6 @@ print_centered "██▄▪▐█▐█▄█▌▐█▌▐█▌▐▌██.
|
|
|
print_centered "·▀▀▀▀ ▀▀▀ ▀▀▀.▀▀▀ ▀▀▀▀▀• ▀▀▀ .▀ ▀"
|
|
|
print_centered "$(tput setaf 7)$(tput bold)"
|
|
|
#print_centered "Autoconfig Ubuntu pour le backup des Users"
|
|
|
-if [ -z $Mode ];then source ~/b10.conf;fi
|
|
|
-if [ $Mode = "NVIDIALHR" ]
|
|
|
-then
|
|
|
-print_centered "NVIDIA-RTX + NZXT + windows 10"
|
|
|
-echo -n "$(tput setaf 9)$(tput blink)"
|
|
|
-print_centered "LHR mining"
|
|
|
-echo -n "$(tput setaf 7)$(tput sgr0)"
|
|
|
-fi
|
|
|
if [ $Mode = "NVIDIAGTX" ]
|
|
|
then
|
|
|
print_centered "NVIDIA-GTX + NZXT + windows 10"
|
|
@@ -341,10 +363,10 @@ rm /home/wareck/hashcat.tar.xz
|
|
|
cd /home/wareck/
|
|
|
echo -e ""
|
|
|
git clone https://github.com/openwall/john.git
|
|
|
-cd john
|
|
|
+cd /home/wareck/john
|
|
|
sudo apt-get -y install git build-essential libssl-dev zlib1g-dev
|
|
|
sudo apt-get -y install yasm pkg-config libgmp-dev libpcap-dev libbz2-dev clang
|
|
|
-cd src
|
|
|
+cd /home/wareck/john/src
|
|
|
./configure
|
|
|
make -s clean
|
|
|
make -j$(nproc)
|
|
@@ -354,94 +376,10 @@ function outro {
|
|
|
print_centered "$(tput setaf 3)$(tput bold)"
|
|
|
print_centered "Système pret, reboot recommandé !"
|
|
|
echo "$(tput setaf 7)"
|
|
|
-rm ~/.config/autostart/build.desktop
|
|
|
-rm ~/LHR1
|
|
|
-rm ~/LHR2
|
|
|
-rm ~/.pass1
|
|
|
-rm ~/.pass2
|
|
|
-rm ~/NVIDIA-Linux-x86_64-470.129.06.run
|
|
|
-if grep "/home/wareck/backup_users_win10/build/build_linux.sh" ~/.bashrc >/dev/null
|
|
|
-then
|
|
|
-sed -i '$ d' /home/wareck/.bashrc
|
|
|
-fi
|
|
|
-}
|
|
|
-
|
|
|
-function autorunme {
|
|
|
-if [ ! -d /home/wareck/.config/autostart ]
|
|
|
-then
|
|
|
-echo -e "$(tput setaf 10)\nInit install & autostart:$(tput sgr0)"
|
|
|
-mkdir /home/wareck/.config/autostart
|
|
|
-echo -e "Done."
|
|
|
-fi
|
|
|
-
|
|
|
-if [ ! -f /home/wareck/.config/autostart/build.desktop ]
|
|
|
-then
|
|
|
-cat <<'EOF'>> /home/wareck/.config/autostart/build.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 "/home/wareck/backup_users_win10/build/build_linux.sh"
|
|
|
-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/build.desktop
|
|
|
-fi
|
|
|
-
|
|
|
-if ! grep "build_linux.sh" ~/.bashrc >/dev/null
|
|
|
- then
|
|
|
- echo "/home/wareck/backup_users_win10/build/build_linux.sh" >> ~/.bashrc
|
|
|
-fi
|
|
|
-}
|
|
|
-
|
|
|
-function LHR {
|
|
|
-if [ ! -f ~/LHR1 ]
|
|
|
-then
|
|
|
-echo -e "Installation driver NVIDIA-470 LHR:"
|
|
|
-cd ~/
|
|
|
-wget -c -q --show-progress http://wareck.free.fr/genethos/NVIDIA-Linux-x86_64-470.129.06.run
|
|
|
-chmod +x ~/NVIDIA-Linux-x86_64-470.129.06.run
|
|
|
-touch ~/LHR1
|
|
|
-sudo systemctl isolate multi-user.target
|
|
|
-fi
|
|
|
-
|
|
|
-if [ -f ~/LHR1 ]
|
|
|
-then
|
|
|
-sudo modprobe -r nvidia-drm
|
|
|
-cd ~
|
|
|
-sudo ./NVIDIA-Linux-x86_64-470.129.06.run -a
|
|
|
-touch ~/LHR2
|
|
|
-if grep "/home/wareck/backup_users_win10/build/build_linux.sh" ~/.bashrc >/dev/null
|
|
|
-then
|
|
|
-sed -i '$ d' /home/wareck/.bashrc
|
|
|
-fi
|
|
|
-sudo systemctl start graphical.target
|
|
|
-fi
|
|
|
}
|
|
|
|
|
|
choice
|
|
|
intro
|
|
|
-if [ $Mode = "NVIDIALHR" ]
|
|
|
- then
|
|
|
- autorunme
|
|
|
-if [ ! -f ~/LHR2 ];then LHR ;fi
|
|
|
-fi
|
|
|
update_one
|
|
|
liquidcontrol
|
|
|
sleep 1
|