Votre Nom il y a 1 an
Parent
commit
57671420c0
1 fichiers modifiés avec 47 ajouts et 2 suppressions
  1. 47 2
      options/chia.sh

+ 47 - 2
options/chia.sh

@@ -1,12 +1,12 @@
 #!/bin/bash
 set -e
 Gui=No #can be Yes No or Only
-Service=Yes
 Version=4.2
 MadMax=Yes
 GigaHorse=Yes
 BladeBit=Yes
 ChiaPos=Yes
+Service=Yes
 function print_centered {
      [[ $# == 0 ]] && return 1
 
@@ -167,6 +167,22 @@ if [ ! -d build ];then mkdir build;fi
 cd build
 cmake ..
 make -j6
+cat <<'EOF'>> hpool.sh
+#!/bin/bash
+./bladebit_cuda \
+-p a99e72c49c5ed39bf793caab9e074a80dd61011a859e975842874aab47b783f9ce84282febe2ca275c0930149b67990a \
+-f 8ba5acd276b45fd0f749ce195dcddcf0e63c3bf2e751e9e273faa0125075c36a11f2ee231e7cf74abed2920be97fc373 \
+diskplot -t1 /nvme0/plotting/ -t2 /nvme1/plotting/ /farm/farm0/Plots/
+EOF
+cat <<'EOF'>> flex.sh
+#!/bin/bash
+./bladebit_cuda \
+-c xch10yjksfwm8s66z32qy35x950608hk8l67vmsur4rwpaanpkd6ks3qhfw5nk \
+-f 8ba5acd276b45fd0f749ce195dcddcf0e63c3bf2e751e9e273faa0125075c36a11f2ee231e7cf74abed2920be97fc373 \
+diskplot -t1 /nvme0/plotting/ -t2 /nvme1/plotting/ /farm/farm0/Plots/
+EOF
+chmod +x hpool.sh
+chmod +x flex.sh
 echo -e "\e[97mDone.\e[0m"
 }
 
@@ -255,7 +271,7 @@ sh install-gui.sh
 echo -e "\e[97mDone.\e[0m"
 }
 
-function service_ {
+function service_old {
 echo -e "$(tput setaf 10)\nInstall chia-miner service (hpool) :$(tput sgr0)"
 sleep 1
 echo "Generation du fichier /etc/init.d/chia-miner"
@@ -302,6 +318,35 @@ sudo rm chia-miner.sh
 echo -e "\e[97mDone.\e[0m"
 }
 
+function service_ {
+echo -e "$(tput setaf 10)\nInstall chia-miner service (hpool) :$(tput sgr0)"
+sleep 1
+cat <<'EOF'>> chia-miner.service
+[Unit]
+Description=HPool miner
+After=network.target
+StartLimitIntervalSec=500
+StartLimitBurst=5
+[Service]
+#Restart=on-failure
+#RestartSec=5s
+WorkingDirectory=/home/wareck/miners/chia-miner/
+User=wareck
+Group=adm
+ExecStart=/usr/bin/screen -DmS hpool-miner /home/wareck/miners/chia-miner/hpool-miner-chia -config /home/wareck/miners/chia-miner/config.yaml
+ExecStop=/usr/bin/screen -S hpool-miner -X quit
+
+LimitNOFILE=999999
+[Install]
+WantedBy=multi-user.target
+EOF
+sudo mv chia-miner.service /etc/systemd/system/hpool-miner.service
+sudo systemctl daemon-reload
+sudo systemctl start hpool-miner.service
+sudo systemctl enable hpool-miner.service
+echo -e "\e[97mDone.\e[0m"
+}
+
 function cmake_ {
 if [ $BladeBit = "YES" ]
 then