Browse Source

update edge

Votre Nom 8 months ago
parent
commit
36b509f95a
1 changed files with 34 additions and 105 deletions
  1. 34 105
      edge.sh

+ 34 - 105
edge.sh

@@ -11,20 +11,22 @@ if (( $EUID != 0 )); then
    echo -e "$(tput setaf 11)This must be run as root. Try 'sudo $0'.$(tput sgr0)"
    echo -e "$(tput setaf 11)This must be run as root. Try 'sudo $0'.$(tput sgr0)"
    exit 1
    exit 1
 fi
 fi
+
 clear
 clear
+
 if [ ! -f /home/wareck/.ipass ]
 if [ ! -f /home/wareck/.ipass ]
 then
 then
 echo "passe=1" > /home/wareck/.ipass
 echo "passe=1" > /home/wareck/.ipass
 fi
 fi
 source /home/wareck/.ipass
 source /home/wareck/.ipass
 
 
-
 export TERM=xterm-256color
 export TERM=xterm-256color
 Cuda=${Cuda^^}
 Cuda=${Cuda^^}
 kernel_custom=${kernel_custom^^}
 kernel_custom=${kernel_custom^^}
 driver=${driver^^}
 driver=${driver^^}
 Miners=${Miners^^}
 Miners=${Miners^^}
 cpass=""
 cpass=""
+
 function ubuntu_version_check {
 function ubuntu_version_check {
 if [[ $(lsb_release -rs) == "20.04" ]]
 if [[ $(lsb_release -rs) == "20.04" ]]
 then
 then
@@ -73,7 +75,7 @@ sudo reboot
 }
 }
 
 
 function intro_ {
 function intro_ {
-print_centered "$(tput setaf 5)"
+print_centered "$(tput setaf 1)"
 print_centered "███████╗██████╗  ██████╗ ███████╗"
 print_centered "███████╗██████╗  ██████╗ ███████╗"
 print_centered "██╔════╝██╔══██╗██╔════╝ ██╔════╝"
 print_centered "██╔════╝██╔══██╗██╔════╝ ██╔════╝"
 print_centered "█████╗  ██║  ██║██║  ███╗█████╗  "
 print_centered "█████╗  ██║  ██║██║  ███╗█████╗  "
@@ -100,12 +102,12 @@ case $passe in
    sudo apt-get install lxde lxde-icon-theme -y
    sudo apt-get install lxde lxde-icon-theme -y
    echo -e ""
    echo -e ""
    sudo apt-get install samba cifs-utils mdadm git build-essential libtool pkg-config automake autoconf ethtool net-tools openvpn filezilla \
    sudo apt-get install samba cifs-utils mdadm git build-essential libtool pkg-config automake autoconf ethtool net-tools openvpn filezilla \
-   tasksel lzma-dev lzma cmake libuv1-dev libssl-dev msr-tools tightvncserver lm-sensors openssh-server xfsprogs -y
+   tasksel lzma-dev lzma cmake libuv1-dev libssl-dev msr-tools tightvncserver openssh-server xfsprogs -y
    echo -e ""
    echo -e ""
    sudo apt-get install zstd pixz pbzip2 pigz btrfs-progs gparted gpart gnome-remote-desktop libcanberra-gtk-module \
    sudo apt-get install zstd pixz pbzip2 pigz btrfs-progs gparted gpart gnome-remote-desktop libcanberra-gtk-module \
    ctorrent libcurl4-openssl-dev bison byacc screen libudev-dev libjansson-dev libncurses5-dev libmicrohttpd-dev curl nvme-cli -y
    ctorrent libcurl4-openssl-dev bison byacc screen libudev-dev libjansson-dev libncurses5-dev libmicrohttpd-dev curl nvme-cli -y
    echo -e ""
    echo -e ""
-   sudo apt-get install libglib2.0-dev libgtk2.0-dev libsensors4-dev htop vlc locate cmake -y
+   sudo apt-get install libglib2.0-dev libgtk2.0-dev htop vlc locate cmake -y
    echo -e "Done."
    echo -e "Done."
    ;;
    ;;
 2)
 2)
@@ -188,10 +190,8 @@ fi
 
 
 function download_packs_ {
 function download_packs_ {
 echo -e "$(tput setaf 10)\nDownload complement packs:$(tput sgr0)"
 echo -e "$(tput setaf 10)\nDownload complement packs:$(tput sgr0)"
-wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/cgminer.conf -O /home/wareck/Build_Cube/pack/cgminer.conf
 wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/chia-miner.tar.xz -O /home/wareck/Build_Cube/pack/chia-miner.tar.xz
 wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/chia-miner.tar.xz -O /home/wareck/Build_Cube/pack/chia-miner.tar.xz
 wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/gerbera.tar.xz -O /home/wareck/Build_Cube/pack/gerbera.tar.xz
 wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/gerbera.tar.xz -O /home/wareck/Build_Cube/pack/gerbera.tar.xz
-wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/start_cgminer.tar.xz -O /home/wareck/Build_Cube/pack/start_cgminer.tar.xz
 wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/$Webmin.tar.xz -O /home/wareck/Build_Cube/pack/$Webmin.tar.xz
 wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/$Webmin.tar.xz -O /home/wareck/Build_Cube/pack/$Webmin.tar.xz
 wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/xmrig.tar.xz -O /home/wareck/Build_Cube/pack/xmrig.tar.xz
 wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/xmrig.tar.xz -O /home/wareck/Build_Cube/pack/xmrig.tar.xz
 wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/zfsmanager-0.0.4.wbm.gz -O /home/wareck/Build_Cube/pack/zfsmanager-0.0.4.wbm.gz
 wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/zfsmanager-0.0.4.wbm.gz -O /home/wareck/Build_Cube/pack/zfsmanager-0.0.4.wbm.gz
@@ -202,7 +202,6 @@ cp /home/wareck/Build_Cube/pack/pack1.tar.xz /home/wareck
 cp /home/wareck/Build_Cube/pack/pack2.tar.xz /home/wareck
 cp /home/wareck/Build_Cube/pack/pack2.tar.xz /home/wareck
 cp /home/wareck/Build_Cube/pack/pack3.tar.xz /home/wareck
 cp /home/wareck/Build_Cube/pack/pack3.tar.xz /home/wareck
 cp /home/wareck/Build_Cube/pack/xmrig.tar.xz /home/wareck
 cp /home/wareck/Build_Cube/pack/xmrig.tar.xz /home/wareck
-cp /home/wareck/Build_Cube/pack/start_cgminer.tar.xz /home/wareck
 echo -e "Done."
 echo -e "Done."
 
 
 if  [ ! -d /home/wareck/$Webmin ]
 if  [ ! -d /home/wareck/$Webmin ]
@@ -262,19 +261,6 @@ sudo chmod -R 775 /home/wareck/miners
 }
 }
 
 
 function configure_ {
 function configure_ {
-echo -e "$(tput setaf 10)\nlxPanel sensors:$(tput sgr0)"
-cd /home/wareck
-if ! [ -d sensors-lxpanel-plugin ]
-then
-git clone https://github.com/danamlund/sensors-lxpanel-plugin.git
-fi
-cd /home/wareck
-cd sensors-lxpanel-plugin
-make
-sudo make install
-sudo rm -r /home/wareck/sensors-lxpanel-plugin
-echo "Done."
-
 echo -e "$(tput setaf 10)\nConfig files:$(tput sgr0)"
 echo -e "$(tput setaf 10)\nConfig files:$(tput sgr0)"
 cd /home/wareck/
 cd /home/wareck/
 zip="['firefox.desktop', 'thunderbird.desktop', 'org.remmina.Remmina.desktop', 'filezilla.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Terminal.desktop']"
 zip="['firefox.desktop', 'thunderbird.desktop', 'org.remmina.Remmina.desktop', 'filezilla.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Terminal.desktop']"
@@ -341,7 +327,7 @@ fi
 sudo rm /etc/hosts
 sudo rm /etc/hosts
 sudo cat <<'EOF'>> /etc/hosts
 sudo cat <<'EOF'>> /etc/hosts
 127.0.0.1       localhost
 127.0.0.1       localhost
-127.0.1.1       poweredge
+127.0.1.1       Jupiter
 192.168.1.8     miniserver miniserver gogserver.dnsalias.com
 192.168.1.8     miniserver miniserver gogserver.dnsalias.com
 192.168.1.10    nzxt
 192.168.1.10    nzxt
 192.168.1.11    garage
 192.168.1.11    garage
@@ -358,85 +344,6 @@ ff02::2 ip6-allrouters
 EOF
 EOF
 echo "Done."
 echo "Done."
 
 
-echo -e "$(tput setaf 10)\nSensors drivers:$(tput sgr0)"
-if ! grep "it87" /etc/modules >/dev/null
-then
-cp /etc/modules /tmp/modules
-cat <<"EOF">> /tmp/modules
-
-# Chip drivers
-it87
-EOF
-sudo cp /tmp/modules /etc/modules
-fi
-if [ -f /tmp/sensors3.conf ]
-then
-chmod 777 /tmp/sensors3.conf
-rm /tmp/sensors3.conf
-fi
-cat <<'EOF'>> /tmp/sensors3.conf
-chip "it8728-isa-0228"
-label  in0  "Vcore"
-label  in1  "Vdram"    # "DDR3" in BIOS
-label  in2  "+3.3V"
-label  in3  "+5V"      # Not in BIOS
-label  in4  "+12V"
-ignore in5             # -12V unused
-ignore in6
-label  in7  "5VSB"     # Not in BIOS
-label  in8  "Vbat"     # Not in BIOS
-compute  in3  @ * (6.8/10+1), @ / (6.8/10+1)
-compute  in4  @ * 3.963,      @ / 3.963
-compute  in7  @ * (6.8/10+1), @ / (6.8/10+1)
-set in0_min  0.825 * 0.95
-set in0_max  1.425 * 1.05
-set in1_min  1.5   * 0.95
-set in1_max  1.5   * 1.05
-set in2_min  3.3   * 0.95
-set in2_max  3.3   * 1.05
-set in3_min  5     * 0.95
-set in3_max  5     * 1.05
-set in4_min 12     * 0.95
-set in4_max 12     * 1.05
-set in7_min  5     * 0.95
-set in7_max  5     * 1.05
-ignore cpu0_vid
-set fan4_min 100
-set fan1_min 100
-ignore fan2
-ignore fan3
-ignore fan5
-ignore in8
-ignore intrusion0
-label fan1 "fan1"
-label fan4 "fan2"
-label temp1 "MB"
-label temp2 "CPU"
-set temp2_min 0
-set temp2_max 75
-set temp1_min 0
-set temp1_max 90
-set temp1_beep 0.0
-label temp1 "VRM Temp"
-set   temp1_min 0
-set   temp1_max 65
-label temp2  "SB Temp"
-label temp3 "CPU Temp"
-set   temp3_min 0
-set   temp3_max 65
-
-chip "nvme-pci-0400"
-set temp2_max 75
-set temp2_min 20
-set temp3_max 75
-set temp3_min 20
-EOF
-
-chmod 644 /tmp/sensors3.conf
-sudo cp /tmp/sensors3.conf /etc/
-sudo sensors -s
-sensors
-
 sudo apt install ethtool -y
 sudo apt install ethtool -y
 iface=$(ip link | awk -F: '$0 !~ "lo|vir|^[^0-9]"{printf $2a}' | cut -d ' ' -f2)
 iface=$(ip link | awk -F: '$0 !~ "lo|vir|^[^0-9]"{printf $2a}' | cut -d ' ' -f2)
 sudo ethtool --change $iface wol g
 sudo ethtool --change $iface wol g
@@ -509,7 +416,6 @@ sed -i -e "s/GRUB_CMDLINE_LINUX=\"/GRUB_CMDLINE_LINUX=\"ipv6.disable=1 acpi_enfo
 sudo update-grub2
 sudo update-grub2
 fi
 fi
 sudo chown -R wareck:wareck /home/wareck/miners/xmr*
 sudo chown -R wareck:wareck /home/wareck/miners/xmr*
-sudo chown -R wareck:wareck /home/wareck/miners/cgminer*
 sudo apt-get remove light-locker* -y
 sudo apt-get remove light-locker* -y
 if [ ! -d /home/wareck/.config/lxpanel/LXDE/panels ]
 if [ ! -d /home/wareck/.config/lxpanel/LXDE/panels ]
 then
 then
@@ -552,9 +458,9 @@ fi
 
 
 function mounting_drives_ {
 function mounting_drives_ {
 echo -e "$(tput setaf 10)\nMounting Drives$(tput sgr0)"
 echo -e "$(tput setaf 10)\nMounting Drives$(tput sgr0)"
-if ! findmnt /media/store >/dev/null ; then sudo mount /media/Store ;fi
-sudo chmod 777 /media/store
-sudo chmod 777 /raid
+#if ! findmnt /store >/dev/null ; then sudo mount /store |null ;fi
+#sudo chmod 777 /store
+#sudo chmod 777 /raid
 echo "Done."
 echo "Done."
 }
 }
 
 
@@ -585,7 +491,6 @@ sudo chown -R wareck:wareck /home/wareck/miners
 sudo chmod -R 775 /home/wareck/miners
 sudo chmod -R 775 /home/wareck/miners
 ./clean.sh
 ./clean.sh
 echo -e "Done. \n"
 echo -e "Done. \n"
-
 echo `date` "install/update" >/home/wareck/.buildcube
 echo `date` "install/update" >/home/wareck/.buildcube
 sudo apt-get autoremove -y
 sudo apt-get autoremove -y
 sleep 1
 sleep 1
@@ -703,6 +608,25 @@ pids=""
 wait $pids
 wait $pids
 }
 }
 
 
+function chia_ {
+echo -e "$(tput setaf 10)\nInstall Chia:$(tput sgr0)"
+cd /home/wareck/Build_Cube/
+cp /home/wareck/Build_Cube/options/chia.sh .
+sed -i "s/Gui=Yes/Gui=No/g" chia.sh
+sed -i "s/ChiaPos=Yes/ChiaPos=No/g" chia.sh
+sed -i "s/Miner=Yes/Miner=No/g" chia.sh
+sed -i "s/ChiaService=Yes/ChiaService=No/g" chia.sh
+sed -i "s/Miner=Yes/Miner=No/g" chia.sh
+sed -i "s/ChiaProxy=Yes/ChiaProxy=No/g" chia.sh
+sed -i "s/Toolkit for Chia v$Version/Toolkit for Chia AlmaLinux /g" chia.sh
+sed -i "s/sudo apt-get install/#sudo apt-get install/g" chia.sh
+sed -i "s/-j 6/-j 32/g" chia.sh
+chmod +x chia.sh
+bash chia.sh
+#rm chia.sh
+echo -e "\nDone"
+}
+
 function wol_ {
 function wol_ {
 iface=$(ip link | awk -F: '$0 !~ "lo|vir|^[^0-9]"{printf $2a}' | cut -d ' ' -f2)
 iface=$(ip link | awk -F: '$0 !~ "lo|vir|^[^0-9]"{printf $2a}' | cut -d ' ' -f2)
 ether=$(which ethtool)
 ether=$(which ethtool)
@@ -723,7 +647,11 @@ sleep 2
 clear
 clear
 }
 }
 
 
+
+
+
 intro_
 intro_
+
 case $passe in
 case $passe in
 1)
 1)
   watchdog_
   watchdog_
@@ -750,6 +678,7 @@ case $passe in
   clear
   clear
   wol_
   wol_
   dynmotd
   dynmotd
+  chia_
   ;;
   ;;
 *) ;;
 *) ;;
 esac
 esac