Update rebuilt-machine.sh
updated script to handle arm based machines and setup Hub as well. Also modified Java version default.
This commit is contained in:
		@@ -15,9 +15,9 @@ echo "${YELLOW} UPDATING UBUNTU AND INSTALLING REQUIRED SOFTWARE PACKAGES ${NC}\
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
sudo apt update 
 | 
					sudo apt update 
 | 
				
			||||||
# TODO - check if the system is ubuntu, if so then remove the bullshit ubuntu-advantage-tools, then re-install gnome-software - for now, just purge it and install gnome-software assuming it's an ubuntu-compatible distro.
 | 
					# TODO - check if the system is ubuntu, if so then remove the bullshit ubuntu-advantage-tools, then re-install gnome-software - for now, just purge it and install gnome-software assuming it's an ubuntu-compatible distro.
 | 
				
			||||||
sudo apt -y --purge remove ubuntu-advantage-tools
 | 
					sudo apt -y --purge remove ubuntu-advantage-tools ubuntu-pro-client*
 | 
				
			||||||
sudo apt -y upgrade
 | 
					sudo apt -y upgrade
 | 
				
			||||||
sudo apt -y install gnome-software unzip vim curl openjdk-17-jre zlib1g-dev vlc chromium-browser p7zip-full libfuse2 htop net-tools bpytop ffmpeg sysbench smartmontools ksnip xsensors fonts-symbola lm-sensors cinnamon-desktop-environment
 | 
					sudo apt -y install gnome-software unzip vim curl openjdk-21-jre zlib1g-dev vlc chromium-browser p7zip-full libfuse2 htop net-tools bpytop ffmpeg sysbench smartmontools ksnip xsensors fonts-symbola lm-sensors cinnamon-desktop-environment
 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo "${YELLOW} DOWNLOADING QORTAL CORE AND QORT SCRIPT ${NC}\n"
 | 
					echo "${YELLOW} DOWNLOADING QORTAL CORE AND QORT SCRIPT ${NC}\n"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -37,56 +37,62 @@ chmod +x *.sh
 | 
				
			|||||||
curl -L -O https://raw.githubusercontent.com/Qortal/qortal/master/tools/qort
 | 
					curl -L -O https://raw.githubusercontent.com/Qortal/qortal/master/tools/qort
 | 
				
			||||||
chmod +x qort
 | 
					chmod +x qort
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
cd 
 | 
					cd 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ -f qortal/Qortal-UI ]; then
 | 
					if [ -f qortal/Qortal-UI ]; then
 | 
				
			||||||
  echo "${PURPLE} PREVIOUS Qortal-UI FOUND, BACKING UP ORIGINAL TO '~/backups/' AND RE-INSTALLING ${NC}\n"
 | 
					  echo "${PURPLE} PREVIOUS Qortal-UI FOUND, BACKING UP ORIGINAL TO '~/backups/' AND RE-INSTALLING ${NC}\n"
 | 
				
			||||||
  mv qortal/Qortal-UI ~/backups/
 | 
					  mv qortal/Qortal-UI ~/backups/
 | 
				
			||||||
fi 
 | 
					fi 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cd qortal
 | 
					cd qortal
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ "$(uname -m)" = "aarch64" ]; then
 | 
				
			||||||
 | 
					    echo "ARM 64-bit detected"
 | 
				
			||||||
 | 
					    echo "Downloading 64bit arm-based UI and Qortal Hub"
 | 
				
			||||||
 | 
					    curl -L -O https://github.com/Qortal/Qortal-Hub/releases/download/v0.5.3/Qortal-Hub-arm64_0.5.3.AppImage
 | 
				
			||||||
 | 
					    curl -L -O https://github.com/Qortal/qortal-ui/releases/download/v4.6.1/Qortal-Setup-arm64.AppImage
 | 
				
			||||||
 | 
					    chmod +x *.AppImage
 | 
				
			||||||
 | 
					    mv Qortal-Hub-arm64* Qortal-Hub
 | 
				
			||||||
 | 
					    mv Qortal-Setup-arm64* Qortal-UI
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					curl -L -O https://github.com/Qortal/Qortal-Hub/releases/download/v0.5.3/Qortal-Hub_0.5.3.AppImage
 | 
				
			||||||
curl -L -O https://github.com/Qortal/qortal-ui/releases/latest/download/Qortal-Setup-amd64.AppImage
 | 
					curl -L -O https://github.com/Qortal/qortal-ui/releases/latest/download/Qortal-Setup-amd64.AppImage
 | 
				
			||||||
mv Qortal-Setup*.AppImage Qortal-UI
 | 
					mv Qortal-Setup*.AppImage Qortal-UI
 | 
				
			||||||
 | 
					mv Qortal-Hub*.AppImage Qortal-Hub
 | 
				
			||||||
chmod +x Qortal-UI
 | 
					chmod +x Qortal-UI
 | 
				
			||||||
 | 
					chmod +x Qortal-Hub
 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo "${YELLOW} DOWNLOADING PICTURE FILES AND OTHER SCRIPTS ${NC}\n"
 | 
					echo "${YELLOW} DOWNLOADING PICTURE FILES AND OTHER SCRIPTS ${NC}\n"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cd
 | 
					cd
 | 
				
			||||||
 | 
					
 | 
				
			||||||
curl -L -O https://cloud.qortal.org/s/t4Fy8Lp4kQYiYZN/download/Machine-files.zip
 | 
					#curl -L -O https://cloud.qortal.org/s/t4Fy8Lp4kQYiYZN/download/Machine-files.zip
 | 
				
			||||||
 | 
					curl -L -O https://cloud.qortal.org/s/machine_files/download
 | 
				
			||||||
curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/refresh-qortal.sh
 | 
					curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/refresh-qortal.sh
 | 
				
			||||||
curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/auto-fix-qortal.sh
 | 
					curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/auto-fix-qortal.sh
 | 
				
			||||||
curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/check-qortal-status.sh
 | 
					curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/check-qortal-status.sh
 | 
				
			||||||
curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/start-qortal.sh
 | 
					curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/start-qortal.sh
 | 
				
			||||||
 | 
					curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/start-qortal-core.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
chmod +x *.sh
 | 
					chmod +x *.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
curl -L -O https://cloud.qortal.org/s/6d8qoEkQRDSCTqn/download/rebuilt-machine-setup.txt
 | 
					unzip download
 | 
				
			||||||
mv rebuilt-machine-setup.txt ~/Desktop
 | 
					 | 
				
			||||||
if [ -d ~/Pictures/wallpapers ]; then
 | 
					 | 
				
			||||||
  echo "${PURPLE} PREVIOUS wallpapers folder FOUND, BACKING UP ORIGINAL TO '~/backups/' AND RE-INSTALLING ${NC}\n"
 | 
					 | 
				
			||||||
  mkdir -p ~/backups
 | 
					 | 
				
			||||||
  mv ~/Pictures/wallpapers ~/backups
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
if [ -d ~/Pictures/icons ]; then
 | 
					 | 
				
			||||||
  echo "${PURPLE} PREVIOUS icons folder FOUND, BACKING UP ORIGINAL TO '~/backups/' AND RE-INSTALLING ${NC}\n"
 | 
					 | 
				
			||||||
  mkdir -p ~/backups
 | 
					 | 
				
			||||||
  mv ~/Pictures/icons ~/backups
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
unzip Machine-files.zip
 | 
					rsync -raPz Machine-files/* ${HOME}
 | 
				
			||||||
 | 
					rm -rf Machine-files download
 | 
				
			||||||
mv Machine-files/Pictures ~/
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo "${YELLOW} FINISHING UP ${NC}\n"
 | 
					echo "${YELLOW} FINISHING UP ${NC}\n"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
username=$(whoami)
 | 
					username=$(whoami)
 | 
				
			||||||
echo "@reboot sleep 399 && ./auto-fix-qortal.sh > \"/home/${username}/qortal/auto-fix-startup.log\" 2>&1" >> "rebuilt-machine-cron"
 | 
					echo "@reboot sleep 399 && ./auto-fix-qortal.sh > \"/home/${username}/qortal/auto-fix-startup.log\" 2>&1" >> "rebuilt-machine-cron"
 | 
				
			||||||
 | 
					echo "@reboot ./start-qortal-core.sh" >> "rebuilt-machine-cron"
 | 
				
			||||||
echo "1 1 */3 * * /home/$(whoami)/auto-fix-qortal.sh > \"/home/${username}/qortal/auto-fix-01.log\" 2>&1" >> "rebuilt-machine-cron"
 | 
					echo "1 1 */3 * * /home/$(whoami)/auto-fix-qortal.sh > \"/home/${username}/qortal/auto-fix-01.log\" 2>&1" >> "rebuilt-machine-cron"
 | 
				
			||||||
chmod +x *.sh
 | 
					chmod +x *.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
crontab rebuilt-machine-cron
 | 
					crontab rebuilt-machine-cron
 | 
				
			||||||
 | 
					
 | 
				
			||||||
rm -rf Machine-files Machine-files.zip rebuilt-machine-cron
 | 
					rm -rf rebuilt-machine-cron
 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo "${YELLOW} REBOOTING MACHINE IN 10 SECONDS - USE CINNAMON DESKTOP ENVIRONMENT UPON REBOOT BY CLICKING LOGIN NAME THEN SETTINGS ICON AT BOTTOM RIGHT, AND CHANGING TO CINNAMON ${NC}\n" 
 | 
					echo "${YELLOW} REBOOTING MACHINE IN 10 SECONDS - USE CINNAMON DESKTOP ENVIRONMENT UPON REBOOT BY CLICKING LOGIN NAME THEN SETTINGS ICON AT BOTTOM RIGHT, AND CHANGING TO CINNAMON ${NC}\n" 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user