Votre Nom 1 year ago
parent
commit
92998d8281
2 changed files with 23 additions and 12 deletions
  1. 8 2
      options/chia.sh
  2. 15 10
      options/tools/_cmake.sh

+ 8 - 2
options/chia.sh

@@ -2,7 +2,7 @@
 #set -e
 Version=6.0.1
 
-Gui=No #can be Yes No or Only
+Gui=Yes #can be Yes No or Only
 GigaHorse_farmer=Yes
 
 MadMax=Yes
@@ -15,6 +15,7 @@ H9_Miner=No
 H9_ChiaProxy=No
 
 FoxyPool=Yes
+FoxyPool_service=No
 
 function print_centered {
      [[ $# == 0 ]] && return 1
@@ -60,6 +61,8 @@ ChiaPos=${ChiaPos^^}
 H9_Miner=${H9_Miner^^}
 H9_ChiaProxy=${H9_ChiaProxy^^}
 FoxyPool=${FoxyPool^^}
+FoxyPool_service=${FoxyPool_service^^}
+
 if [[ "$Gui" ==  "YES" ]] || [[ "$Gui" == "NO" ]] || [[ "$Gui" == "ONLY" ]];then error_flag=$((error_flag+0));else error_flag=$((error_flag+1)) ;fi
 if [[ "$MadMax" ==  "YES" ]] || [[ "$MadMax" = "NO" ]];then error_flag=$((error_flag+0));else error_flag=$((error_flag+1)) ;fi
 if [[ "$GigaHorse" ==  "YES" ]] || [[ "$GigaHorse" == "NO" ]];then error_flag=$((error_flag+0));else error_flag=$((error_flag+1));fi
@@ -70,6 +73,7 @@ if [[ "$H9_ChiaService" == "YES" ]] || [[ "$H9_ChiaService" == "NO" ]];then erro
 if [[ "$H9_Miner" == "YES" ]] || [[ "$H9_Miner" == "NO" ]];then error_flag=$((error_flag+0));else error_flag=$((error_flag+1));fi
 if [[ "$H9_ChiaProxy" == "YES" ]] || [[ "$H9_ChiaProxy" == "NO" ]];then error_flag=$((error_flag+0));else error_flag=$((error_flag+1));fi
 if [[ "$FoxyPool" == "YES" ]] || [[ "$FoxyPool" == "NO" ]];then error_flag=$((error_flag+0));else error_flag=$((error_flag+1));fi
+if [[ "$FoxyPool_service" == "YES" ]] || [[ "$FoxyPool_service" == "NO" ]];then error_flag=$((error_flag+0));else error_flag=$((error_flag+1));fi
 }
 
 function intro_ {
@@ -497,8 +501,9 @@ ProofOfSpace farm -t 8 -d 100 -f $OUT
 EOF
 chmod +x foxypool.sh
 mv foxypool.sh /home/wareck/chia/chia-gigahorse/cuda-plotter/linux/x86_64/foxypool.sh
+}
+function foxypool_service_ {
 echo -e "$(tput setaf 10)\nInstall FoxyPool service :$(tput sgr0)"
-
 cat > $HOME/foxypool.service << EOF
 # The foxypool service (part of systemd)
 # file: /etc/systemd/system/foxypool.service
@@ -585,6 +590,7 @@ if [ $H9_Miner = "YES" ];then miner_;fi
 if [ $H9_ChiaService = "YES" ];then service_;fi
 if [ $H9_ChiaProxy = "YES" ]; then chia_proxy;fi
 if [ $FoxyPool = "YES" ]; then foxypool_;fi
+if [ $FoxyPool_service = "YES" ]; then foxypool_service_;fi
 if [ $GigaHorse_farmer = "YES" ];then GigaHorse_farmer_;fi
 if [ $Gui = "YES" ]; then chia_blockchain;fi
 

+ 15 - 10
options/tools/_cmake.sh

@@ -1,43 +1,48 @@
 #!/bin/bash
 Mode=prod
 error_flag=0
+export TERM=xterm-256color
 
 function version {
 echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }';
 }
+function intro_ {
+echo -e "$(tput setaf 10)Install / Update cmake tool v2.0 :$(tput sgr0)"
+}
 
 function install_ {
-echo -e "$(tput setaf 10)\nInstall / Update cmake :$(tput sgr0)"
+intro_
 if [ -x "$(command -v cmake)" ];then flag=1; else flag=0;fi
 case $flag in
 0)
+	echo "cmake not installed..."
         wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/cmake_3.26.4-1_amd64.deb
         sudo dpkg -i cmake_3.26.4-1_amd64.deb
         rm cmake_3.26.4-1_amd64.deb
         ;;
 1)
         cmake_v="$(cmake --version | grep "version" | awk '{print $3}')"
-        echo "cmake version : $cmake_v"
+        echo "cmake installed version : $(tput setaf 11)$cmake_v$(tput sgr0)"
         sleep 2
         if ! [ $(version $cmake_v) -ge $(version "3.18") ]
         then
-        echo -e "cmake need update=> cmake_3.27.9"
+        echo -e "cmake need to update=> cmake_3.26.4"
         sudo apt-get -qq remove --purge cmake -y
-        wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/cmake_3.27.9-1_amd64.deb
-        sudo dpkg -i cmake_3.27.9-1_amd64.deb
-        rm cmake_3.27.9-1_amd64.deb
+        wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/cmake_3.26.4-1_amd64.deb
+        sudo dpkg -i cmake_3.26.4-1_amd64.deb
+        rm cmake_3.26.4-1_amd64.deb
         else
-        echo -e "cmake version ok."
+        echo -e "cmake version : $(tput setaf 13)OK$(tput sgr0)"
         sleep 2
         fi
         ;;
 *)      echo "Error";;
 esac
-echo "Done"
+echo -e "\e[97mDone.\e[0m"
 }
 
 function rollback {
-echo -e "$(tput setaf 10)\nInstall / Update cmake :$(tput sgr0)"
+intro_
 if [ -x "$(command -v cmake)" ];then flag=1; else flag=0;fi
 case $flag in
 0)
@@ -63,7 +68,7 @@ case $flag in
         ;;
 *)      echo "Error";;
 esac
-echo "Done"
+echo -e "\e[97mDone.\e[0m"
 }