|
@@ -1,7 +1,8 @@
|
|
|
#!/bin/bash
|
|
|
set -e
|
|
|
Gui=Yes #can be Yes No or Only
|
|
|
-Version=2.3
|
|
|
+Service=No
|
|
|
+Version=2.4
|
|
|
|
|
|
function print_centered {
|
|
|
[[ $# == 0 ]] && return 1
|
|
@@ -78,7 +79,8 @@ cp ../pack/chia-miner.tar.xz /home/wareck/miners
|
|
|
cd /home/wareck/miners
|
|
|
tar xvfJ chia-miner.tar.xz
|
|
|
rm chia-miner.tar.xz
|
|
|
-
|
|
|
+if [ $Service = "Yes" ]
|
|
|
+then
|
|
|
cat <<'EOF'>> chia-miner.sh
|
|
|
#!/bin/sh -e
|
|
|
### BEGIN INIT INFO
|
|
@@ -110,11 +112,11 @@ case "$1" in
|
|
|
esac
|
|
|
exit 0
|
|
|
EOF
|
|
|
-
|
|
|
chmod +x chia-miner.sh
|
|
|
sudo cp chia-miner.sh /etc/init.d/chia-miner
|
|
|
sudo update-rc.d chia-miner defaults
|
|
|
sudo rm chia-miner.sh
|
|
|
+fi
|
|
|
echo -e "\e[97mDone.\e[0m"
|
|
|
|
|
|
echo -e "$(tput setaf 2)\nBuild Chia-Plotter (MadMax) :$(tput sgr0)"
|
|
@@ -161,7 +163,6 @@ make -j4
|
|
|
echo -e "\e[97mDone.\e[0m"
|
|
|
fi
|
|
|
|
|
|
-
|
|
|
if [ $Gui = "Yes" ] || [ $Gui = "Only" ]
|
|
|
then
|
|
|
echo -e "$(tput setaf 2)\nBuild Chia-Gui :$(tput sgr0)"
|