|
@@ -1,14 +1,21 @@
|
|
|
#!/bin/bash
|
|
|
-set -e
|
|
|
-Version=5.0.1
|
|
|
-Gui=No #can be Yes No or Only
|
|
|
+#set -e
|
|
|
+Version=6.0.0
|
|
|
+
|
|
|
+Gui=Yes #can be Yes No or Only
|
|
|
+GigaHorse_farmer=Yes
|
|
|
+
|
|
|
MadMax=Yes
|
|
|
GigaHorse=Yes
|
|
|
BladeBit=Yes
|
|
|
-ChiaPos=No
|
|
|
-ChiaService=Yes
|
|
|
-Miner=Yes
|
|
|
-ChiaProxy=Yes
|
|
|
+ChiaPos=Yes
|
|
|
+
|
|
|
+H9_ChiaService=No
|
|
|
+H9_Miner=No
|
|
|
+H9_ChiaProxy=No
|
|
|
+
|
|
|
+FoxyPool=Yes
|
|
|
+
|
|
|
function print_centered {
|
|
|
[[ $# == 0 ]] && return 1
|
|
|
|
|
@@ -44,24 +51,29 @@ function print_centered {
|
|
|
function simplify_config {
|
|
|
error_flag=0
|
|
|
Gui=${Gui^^}
|
|
|
-ChiaService=${ChiaService^^}
|
|
|
+H9_ChiaService=${H9_ChiaService^^}
|
|
|
MadMax=${MadMax^^}
|
|
|
GigaHorse=${GigaHorse^^}
|
|
|
+GigaHorse_farmer=${GigaHorse_farmer^^}
|
|
|
BladeBit=${BladeBit^^}
|
|
|
ChiaPos=${ChiaPos^^}
|
|
|
-Miner=${Miner^^}
|
|
|
-ChiaProxy=${ChiaProxy^^}
|
|
|
+H9_Miner=${H9_Miner^^}
|
|
|
+H9_ChiaProxy=${H9_ChiaProxy^^}
|
|
|
+FoxyPool=${FoxyPool^^}
|
|
|
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
|
|
|
+if [[ "$GigaHorse_farmer" == "YES" ]] || [[ "$GigaHorse_farmer" == "NO" ]];then error_flag=$((error_flag+0));else error_flag=$((error_flag+1));fi
|
|
|
if [[ "$BladeBit" == "YES" ]] || [[ "$BladeBit" == "NO" ]];then error_flag=$((error_flag+0));else error_flag=$((error_flag+1));fi
|
|
|
if [[ "$ChiaPos" == "YES" ]] || [[ "$ChiaPos" == "NO" ]];then error_flag=$((error_flag+0));else error_flag=$((error_flag+1));fi
|
|
|
-if [[ "$ChiaService" == "YES" ]] || [[ "$ChiaService" == "NO" ]];then error_flag=$((error_flag+0));else error_flag=$((error_flag+1));fi
|
|
|
-if [[ "$Miner" == "YES" ]] || [[ "$Miner" == "NO" ]];then error_flag=$((error_flag+0));else error_flag=$((error_flag+1));fi
|
|
|
-if [[ "$ChiaProxy" == "YES" ]] || [[ "$ChiaProxy" == "NO" ]];then error_flag=$((error_flag+0));else error_flag=$((error_flag+1));fi
|
|
|
+if [[ "$H9_ChiaService" == "YES" ]] || [[ "$H9_ChiaService" == "NO" ]];then error_flag=$((error_flag+0));else error_flag=$((error_flag+1));fi
|
|
|
+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
|
|
|
}
|
|
|
|
|
|
function intro_ {
|
|
|
+export TERM=xterm-256color
|
|
|
print_centered "$(tput setaf 10)"
|
|
|
print_centered " ______ __ __ "
|
|
|
print_centered "| | |--.|__|.---.-."
|
|
@@ -81,8 +93,6 @@ case $Gui in
|
|
|
YES)
|
|
|
echo -n "$(tput setaf 41)"
|
|
|
print_centered "Blockchain wallet + Gui"
|
|
|
- echo -n "$(tput setaf 42)"
|
|
|
- print_centered "Chia Plotting Tools"
|
|
|
echo -n "$(tput sgr0)"
|
|
|
;;
|
|
|
NO)
|
|
@@ -105,25 +115,50 @@ ONLY)
|
|
|
esac
|
|
|
if [ $Gui = "NO" ] || [ $Gui = "YES" ]
|
|
|
then
|
|
|
-case $ChiaService in
|
|
|
+case $GigaHorse_farmer in
|
|
|
+YES)
|
|
|
+ echo -n "$(tput setaf 43)"
|
|
|
+ print_centered "GigaHorse Farmer"
|
|
|
+ echo -n "$(tput sgr0)"
|
|
|
+ ;;
|
|
|
+esac
|
|
|
+case $H9_ChiaService in
|
|
|
YES)
|
|
|
echo -n "$(tput setaf 43)"
|
|
|
print_centered "Mining service Enabled"
|
|
|
echo -n "$(tput sgr0)"
|
|
|
;;
|
|
|
esac
|
|
|
-case $ChiaProxy in
|
|
|
+case $H9_ChiaProxy in
|
|
|
YES)
|
|
|
echo -n "$(tput setaf 44)"
|
|
|
print_centered "Hpool x-Proxy Enabled"
|
|
|
echo -n "$(tput sgr0)"
|
|
|
;;
|
|
|
esac
|
|
|
+case $FoxyPool in
|
|
|
+YES)
|
|
|
+ echo -n "$(tput setaf 166)"
|
|
|
+ print_centered "FoxyPool Enabled"
|
|
|
+ echo -n "$(tput sgr0)"
|
|
|
+ ;;
|
|
|
+esac
|
|
|
fi
|
|
|
sleep 2
|
|
|
if ! [ -d /home/wareck/chia ];then mkdir /home/wareck/chia;fi
|
|
|
}
|
|
|
|
|
|
+function GigaHorse_farmer_ {
|
|
|
+echo -e "$(tput setaf 10)\nInstall GigaHorse Farmer$(tput sgr0)"
|
|
|
+if ! [ -d /home/wareck/chia ];then mkdir /home/wareck/chia;fi
|
|
|
+cd /home/wareck/chia/
|
|
|
+GigaHorse_link=https://github.com/madMAx43v3r/chia-gigahorse/releases/download/v2.1.1.giga25/chia-gigahorse-farmer-2.1.1.giga25-x86_64.tar.gz
|
|
|
+wget -c -q --show-progress $GigaHorse_link -O chia-gigahorse-farmer.tar.gz
|
|
|
+tar xfz chia-gigahorse-farmer.tar.gz --checkpoint=.1000
|
|
|
+rm chia-gigahorse-farmer.tar.gz
|
|
|
+echo -e "\n\e[97mDone.\e[0m"
|
|
|
+}
|
|
|
+
|
|
|
function update_ {
|
|
|
echo -e "$(tput setaf 10)\nUpdate and install packages:$(tput sgr0)"
|
|
|
extend="libgomp1 ocl-icd-opencl-dev libgmp-dev libnuma-dev"
|
|
@@ -167,6 +202,17 @@ OUT=/media/Partage/Plots-nft/
|
|
|
EOF
|
|
|
chmod +x nft.sh
|
|
|
echo -e "\e[97mDone.\e[0m"
|
|
|
+
|
|
|
+if [ -f foxy.sh ];then rm foxy.sh; fi
|
|
|
+cat <<'EOF'>> nft.sh
|
|
|
+#!/bin/bash
|
|
|
+POOL=a99e72c49c5ed39bf793caab9e074a80dd61011a859e975842874aab47b783f9ce84282febe2ca275c0930149b67990a
|
|
|
+FARM=8ba5acd276b45fd0f749ce195dcddcf0e63c3bf2e751e9e273faa0125075c36a11f2ee231e7cf74abed2920be97fc373
|
|
|
+OUT=/media/Partage/Plots-nft/
|
|
|
+./chia_plot -p $POOL -f $FARM -n 1 -r 4 -u 128 -t /nvme0/plotting/ -2 /nvme1/plotting/ -d $OUT
|
|
|
+EOF
|
|
|
+chmod +x foxy.sh
|
|
|
+echo -e "\e[97mDone.\e[0m"
|
|
|
}
|
|
|
|
|
|
function bladebit {
|
|
@@ -204,8 +250,17 @@ FRM=8ba5acd276b45fd0f749ce195dcddcf0e63c3bf2e751e9e273faa0125075c36a11f2ee231e7c
|
|
|
OUT=/media/Partage/Plots-nft/
|
|
|
./bladebit -f $FRM -c $CRT diskplot --cache 100G -t1 /nvme1/plotting/ -t2 /nvme1/plotting/ $OUT
|
|
|
EOF
|
|
|
+if [ -f foxy.sh ]; then rm foxy.sh ;fi
|
|
|
+cat <<'EOF'>> foxy.sh
|
|
|
+#!/bin/bash
|
|
|
+CRT=xch10yjksfwm8s66z32qy35x950608hk8l67vmsur4rwpaanpkd6ks3qhfw5nk
|
|
|
+FRM=8ba5acd276b45fd0f749ce195dcddcf0e63c3bf2e751e9e273faa0125075c36a11f2ee231e7cf74abed2920be97fc373
|
|
|
+OUT=/media/Partage/Plots-nft/
|
|
|
+./bladebit -f $FRM -c $CRT diskplot --cache 100G -t1 /nvme1/plotting/ -t2 /nvme1/plotting/ $OUT
|
|
|
+EOF
|
|
|
chmod +x cuda.sh
|
|
|
chmod +x flex.sh
|
|
|
+chmod +x foxy.sh
|
|
|
echo -e "\e[97mDone.\e[0m"
|
|
|
}
|
|
|
|
|
@@ -244,6 +299,16 @@ EOF
|
|
|
chmod +x ~/go.sh
|
|
|
cp ~/go.sh ~/chia/chia-gigahorse/cpu-plotter/linux/x86_64/
|
|
|
rm ~/go.sh
|
|
|
+cat <<'EOF'>> ~/foxy.sh
|
|
|
+#!/bin/bash
|
|
|
+CRT=xch10yjksfwm8s66z32qy35x950608hk8l67vmsur4rwpaanpkd6ks3qhfw5nk
|
|
|
+FRM=8ba5acd276b45fd0f749ce195dcddcf0e63c3bf2e751e9e273faa0125075c36a11f2ee231e7cf74abed2920be97fc373
|
|
|
+OUT=@192.168.1.100
|
|
|
+./chia_plot -c $CRT -f $FRM -G -r 6 -z 1447 -C 8 -n -1 -t /nvme0/plotting/ -2 /nvme1/plotting/ -d $OUT
|
|
|
+EOF
|
|
|
+chmod +x ~/foxy.sh
|
|
|
+cp ~/foxy.sh ~/chia/chia-gigahorse/cpu-plotter/linux/x86_64/
|
|
|
+rm ~/foxy.sh
|
|
|
echo -e "\e[97mDone.\e[0m"
|
|
|
}
|
|
|
|
|
@@ -292,6 +357,11 @@ fi
|
|
|
sh install.sh
|
|
|
source ./activate
|
|
|
sh install-gui.sh
|
|
|
+if [ -f /Store/.chia ]
|
|
|
+then
|
|
|
+ln -s /Store/.chia /home/wareck/.chia
|
|
|
+ln -s /Store/.chia_keys /home/wareck/.chia_keys
|
|
|
+fi
|
|
|
echo -e "\e[97mDone.\e[0m"
|
|
|
}
|
|
|
|
|
@@ -405,6 +475,84 @@ sudo systemctl enable hpool-miner.service
|
|
|
echo -e "\e[97mDone.\e[0m"
|
|
|
}
|
|
|
|
|
|
+function foxypool_ {
|
|
|
+echo -e "$(tput setaf 10)\nInstall FoxyPool miner :$(tput sgr0)"
|
|
|
+cd /home/wareck/miners
|
|
|
+wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/foxypool.tar.xz
|
|
|
+tar xfJ foxypool.tar.xz --checkpoint=.100
|
|
|
+echo ""
|
|
|
+rm foxypool.tar.xz
|
|
|
+if [ -f /home/wareck/chia/chia-gigahorse/cuda-plotter/linux/x86_64/foxypool.sh ];then rm /home/wareck/chia/chia-gigahorse/cuda-plotter/linux/x86_64/foxypool.sh;fi
|
|
|
+cat <<'EOF'>> foxypool.sh
|
|
|
+CTR=xch1f5y47t9jhkthq4fktq5md2d7wz3ruwdsnqah9ym8k3dd0ll2gheqh7l785
|
|
|
+FPK=8ba5acd276b45fd0f749ce195dcddcf0e63c3bf2e751e9e273faa0125075c36a11f2ee231e7cf74abed2920be97fc373
|
|
|
+OUT=@192.168.1.100
|
|
|
+./cuda_plot_k32 -g 0 -c $CTR -f $FPK -C 17 -n 1 -t /raid/plotting/ -3 /raid/plotting/ -d $OUT
|
|
|
+#/home/wareck/chia/chia-gigahorse/chiapos/linux/x86_64/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
|
|
|
+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
|
|
|
+
|
|
|
+[Unit]
|
|
|
+Description = Foxypool Service
|
|
|
+After=network.target
|
|
|
+
|
|
|
+[Service]
|
|
|
+Type=simple
|
|
|
+User = $USER
|
|
|
+WorkingDirectory= $HOME/miners/foxypool
|
|
|
+ExecStart = $HOME/miners/foxypool/foxy-gh-farmer -c $HOME/miners/foxypool/foxy-gh-farmer.yaml
|
|
|
+Restart = on-failure
|
|
|
+RestartSec=30
|
|
|
+LimitNOFILE=99999
|
|
|
+StandardOutput=syslog
|
|
|
+StandardError=syslog
|
|
|
+SyslogIdentifier=foxypool
|
|
|
+
|
|
|
+
|
|
|
+[Install]
|
|
|
+WantedBy = multi-user.target
|
|
|
+EOF
|
|
|
+sudo mv $HOME/foxypool.service /etc/systemd/system/foxypool.service >/dev/null
|
|
|
+sudo chmod 644 /etc/systemd/system/foxypool.service
|
|
|
+
|
|
|
+cat <<'EOF'>> foxypool.conf
|
|
|
+if $programname == 'flexfarmer' then /var/log/foxypool.log
|
|
|
+& stop
|
|
|
+EOF
|
|
|
+sudo cp foxypool.conf /etc/rsyslog.d/foxypool.conf
|
|
|
+sudo rm foxypool.conf
|
|
|
+if [ ! -f /var/log/foxypool.log ]
|
|
|
+then
|
|
|
+sudo touch /var/log/foxypool.log
|
|
|
+sudo chown syslog:adm /var/log/foxypool.log
|
|
|
+fi
|
|
|
+cat <<'EOF'>> logrot
|
|
|
+/var/log/foxypool.log {
|
|
|
+ daily
|
|
|
+ rotate 7
|
|
|
+ copytruncate
|
|
|
+ notifempty
|
|
|
+ missingok
|
|
|
+ su root syslog
|
|
|
+}
|
|
|
+EOF
|
|
|
+sudo cp logrot /etc/logrotate.d/foxypool
|
|
|
+sudo rm logrot
|
|
|
+
|
|
|
+sudo systemctl restart rsyslog >/dev/null 2>&1
|
|
|
+sudo systemctl daemon-reload >/dev/null 2>&1
|
|
|
+sudo systemctl enable foxypool >/dev/null 2>&1
|
|
|
+sudo systemctl start foxypool >/dev/null 2>&1
|
|
|
+
|
|
|
+echo -e "\e[97mDone.\e[0m"
|
|
|
+}
|
|
|
+
|
|
|
function cmake_ {
|
|
|
if [ $BladeBit = "YES" ]
|
|
|
then
|
|
@@ -423,7 +571,11 @@ ONLY)
|
|
|
chia_blockchain
|
|
|
;;
|
|
|
*)
|
|
|
+
|
|
|
if [ $GigaHorse = "YES" ];then gigahorse;fi
|
|
|
+if [ $GigaHorse_farmer = "YES" ];then GigaHorse_farmer_;fi
|
|
|
+if [ $FoxyPool = "YES" ]; then foxypool_;fi
|
|
|
+exit
|
|
|
if [ $MadMax = "YES" ];then chia_plotter;fi
|
|
|
if [ $BladeBit = "YES" ];then bladebit;fi
|
|
|
if [ $ChiaPos = "YES" ];then chiapos;fi
|
|
@@ -431,6 +583,7 @@ if [ $Miner = "YES" ];then miner_;fi
|
|
|
if [ $ChiaService = "YES" ];then service_;fi
|
|
|
if [ $ChiaProxy = "YES" ]; then chia_proxy;fi
|
|
|
if [ $Gui = "YES" ]; then chia_blockchain;fi
|
|
|
+if [ $FoxyPool = "YES" ]; then foxypool_;fi
|
|
|
;;
|
|
|
esac
|
|
|
|