Votre Nom 1 year ago
parent
commit
e8c84b98ff
1 changed files with 73 additions and 2 deletions
  1. 73 2
      other_arch/alma.sh

+ 73 - 2
other_arch/centos.sh → other_arch/alma.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 set -e
-Version=2.7
+Version=2.8
 
 #if (( $EUID != 0 )); then
 #   echo -e "$(tput setaf 11)This must be run as root. Try 'sudo $0'.$(tput sgr0)"
@@ -145,6 +145,9 @@ cd build
 cmake .. -DXMRIG_DEPS=scripts/deps
 make -j$((`nproc`+1))
 cd /home/wareck/miners
+wget -c http://folivier.homelinux.org/alma/miners_alma.tar.xz
+tar xvfJ miners_alma.tar.xz
+sudo rm -r -f miners_alma.tar.xz
 sudo rm -r -f xmr-stak-rx
 sudo rm -r -f xmrig-upx
 sudo dnf install -y msr-tools-1.3-17.el9.x86_64
@@ -205,14 +208,45 @@ then
 cp /etc/fstab /tmp/fstab
 cat <<'EOF'>> /tmp/fstab
 tmpfs /ramdisk tmpfs defaults,size=110G 0 0
-#/dev/farmer/raid /raid xfs nofail,defaults,noatime,nodiratime    0    0
+UUID=bb011630-398c-4025-bfb6-0fcfbc7c6b7f /raid xfs nofail,defaults,noatime,nodiratime    0    0
+UUID=3fb4be86-702c-4af9-9706-da9ac33f6236 /store xfs nofail,defaults,noatime,nodiratime    0    0
 EOF
 sudo cp /tmp/fstab /etc/fstab
 fi
 if [ ! -r /raid/ ];then sudo mkdir /raid/;fi
+if [ ! -r /store/ ];then sudo mkdir /store/;fi
+#sudo mount /raid
+#sudo mount /store
+#sudo chmod 777 /raid
+#sudo chmod 777 /store
 echo -e "Done"
 }
 
+function crontab_ {
+echo -e "$(tput setaf 10)\nInstall crontab:$(tput sgr0)"
+if ! sudo grep "uploader_chia.sh" /etc/crontab >/dev/null
+then
+cp /etc/crontab /tmp/
+sudo sh -c "echo '*/15 * * * * wareck /usr/local/bin/uploader_chia.sh'" >>/tmp/crontab
+sudo sh -c "echo '@reboot wareck /usr/local/bin/boot_up.sh'" >> /tmp/crontab
+sudo cp /tmp/crontab /etc/crontab
+fi
+if ! [ -f /usr/local/bin/uploader_chia.sh ]
+then
+wget -c -q http://folivier.homelinux.org/alma/uploader_chia.sh -O /tmp/uploader_chia.sh
+sudo cp /tmp/uploader_chia.sh /usr/local/bin/uploader_chia.sh
+sudo chmod +x /usr/local/bin/uploader_chia.sh
+fi
+if ! [ -f /usr/local/bin/boot_up.sh ]
+then
+wget -c -q http://folivier.homelinux.org/alma/boot_up.sh -O /tmp/boot_up.sh
+sudo cp /tmp/boot_up.sh /usr/local/bin/boot_up.sh
+sudo chmod +x /usr/local/bin/boot_up.sh
+fi
+sudo service crond restart
+echo "Done."
+}
+
 function config_ {
 echo -e "$(tput setaf 10)\nTuning:$(tput sgr0)"
 sudo sed -i -e "s/# set constantshow/set constantshow/g" /etc/nanorc
@@ -247,6 +281,41 @@ echo "Done."
 git config --global core.editor "nano"
 }
 
+function bash_ {
+echo -e "$(tput setaf 10)\nInstall script plotter:$(tput sgr0)"
+
+cat <<'EOF'>> /home/wareck/chia/bladebit/build/h9.sh
+#!/bin/bash
+POOL=a99e72c49c5ed39bf793caab9e074a80dd61011a859e975842874aab47b783f9ce84282febe2ca275c0930149b67990a
+FARM=8ba5acd276b45fd0f749ce195dcddcf0e63c3bf2e751e9e273faa0125075c36a11f2ee231e7cf74abed2920be97fc373
+OUT=/store/
+rm /raid/plotting/*
+for i in {1..1}
+do
+echo "$(tput setaf 10)Build Plot N°$i$(tput sgr0)"
+./bladebit -v -t 30 -p $POOL -f $FARM -z 7 diskplot --f1-threads 16 --c-threads 16 --p2-threads 8  --cache 110G -t1 /raid/plotting $OUT
+done
+#sudo init 0
+EOF
+chmod +x /home/wareck/chia/bladebit/build/h9.sh
+cat <<'EOF'>> /home/wareck/chia/chia-gigahorse/cpu-plotter/linux/x86_64/go.sh
+#!/bin/bash
+POOL=a99e72c49c5ed39bf793caab9e074a80dd61011a859e975842874aab47b783f9ce84282febe2ca275c0930149b67990a
+FARM=8ba5acd276b45fd0f749ce195dcddcf0e63c3bf2e751e9e273faa0125075c36a11f2ee231e7cf74abed2920be97fc373
+OUT=/store/
+rm /raid/plotting/*
+for i in {1..1}
+do
+echo "$(tput setaf 10)Build Plot N°$i$(tput sgr0)"
+./bladebit -v -t 30 -p $POOL -f $FARM -z 7 diskplot --f1-threads 16 --c-threads 16 --p2-threads 8  --cache 110G -t1 /raid/plotting $OUT
+done
+#sudo init 0
+EOF
+chmod +x /home/wareck/chia/chia-gigahorse/cpu-plotter/linux/x86_64/go.sh
+echo "Done."
+}
+
+
 intro_
 update_
 lvm2_
@@ -255,6 +324,8 @@ wol_
 tigervnc_
 chia_
 miner_
+crontab_
+bash_
 config_
 webmin_