From 7257a726fe39d7c552321d33238f98302b03c76a Mon Sep 17 00:00:00 2001 From: crowetic <5431064+crowetic@users.noreply.github.com> Date: Sat, 19 Nov 2022 13:27:58 -0800 Subject: [PATCH] fixed issues and added cron and status Initially the script was moving to Machine-files directory, removed that so it doesn't do that anymore, instead simply moves the files without changing directory so it stays 'home' all the time. Also added new cron configuration download and setup, and additional script for checking Qortal status when auto-fix script runs via cron, and has work to do (in which case the Qortal icon will not show up) User can either wait a few hours, then reboot the machine, or use the check-qortal-status script to get the current status of the core after auto-fix runs from cron. Auto-fix setup to run automatically @reboot and every 5 days at 1:01 AM. --- rebuilt-machine.sh | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/rebuilt-machine.sh b/rebuilt-machine.sh index 0d988ca..7d7176a 100644 --- a/rebuilt-machine.sh +++ b/rebuilt-machine.sh @@ -17,7 +17,7 @@ sudo apt update sudo apt -y upgrade sudo apt -y install unzip vim curl default-jre cinnamon-desktop-environment vlc chromium-browser p7zip-full libfuse2 htop -echo "${BLUE} DOWNLOADING QORTAL CORE AND QORT SCRIPT ${NC}" +echo "${BLUE} DOWNLOADING QORTAL CORE AND QORT SCRIPT ${NC}\n" curl -L -O https://github.com/Qortal/qortal/releases/latest/download/qortal.zip unzip qortal*.zip @@ -28,7 +28,7 @@ curl -L -O https://raw.githubusercontent.com/Qortal/qortal/master/tools/qort chmod +x qort -echo "${PURPLE} DOWNLOADING QORTAL UI AppImage AND RENAMING ${NC}" +echo "${PURPLE} DOWNLOADING QORTAL UI AppImage AND RENAMING ${NC}\n" cd cd Desktop @@ -36,18 +36,22 @@ curl -L -O https://github.com/Qortal/qortal-ui/releases/latest/download/Qortal-S mv Qortal-Setup*.AppImage Qortal-UI chmod +x Qortal-UI -echo "${CYAN} DOWNLOADING PICTURE FILES AND OTHER SCRIPTS ${NC}" +echo "${CYAN} DOWNLOADING PICTURE FILES AND OTHER SCRIPTS ${NC}\n" cd curl -L -O https://cloud.qortal.org/s/t4Fy8Lp4kQYiYZN/download/Machine-files.zip +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/check-qortal-status.sh + +chmod +x *.sh +mv check-qortal-status.sh ~/Desktop unzip Machine-files.zip -cd Machine-files - -mv Pictures/*.* ~/Pictures/ -mv start-qortal.sh ~/ +mv Machine-files/Pictures/*.* ~/Pictures/ +mv Machine-files/start-qortal.sh ~/ curl -L -O https://cloud.qortal.org/s/8z4sRiwJCPqM4Fi/download/Qortal-TheFuture-Wallpaper.png mv Qortal-The*.png ~/Pictures/ @@ -56,17 +60,18 @@ mv Qortal-The*.png ~/Pictures/ curl -L -O https://cloud.qortal.org/s/6d8qoEkQRDSCTqn/download/rebuilt-machine-setup.txt mv rebuilt-machine-setup.txt ~/Desktop -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 - -echo "${YELLOW} FINISHING UP ${NC}" +echo "${YELLOW} FINISHING UP ${NC}\n" chmod +x *.sh -rm -R Machine-files +curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/rebuilt-machine-cron +crontab rebuilt-machine-cron -echo "${CYAN} REBOOTING MACHINE - USE CINNAMON DESKTOP ENVIRONMENT UPON REBOOT BY CLICKING LOGIN NAME THEN SETTINGS ICON AT BOTTOM RIGHT, AND CHANGING TO CINNAMON ${NC}" +rm -R Machine-files +rm Machine-files.zip + +echo "${CYAN} REBOOTING MACHINE - USE CINNAMON DESKTOP ENVIRONMENT UPON REBOOT BY CLICKING LOGIN NAME THEN SETTINGS ICON AT BOTTOM RIGHT, AND CHANGING TO CINNAMON ${NC}\n" sudo reboot