From c74481b6940592913b59cd38dbbd0cfc2328361f Mon Sep 17 00:00:00 2001 From: crowetic <5431064+crowetic@users.noreply.github.com> Date: Wed, 10 Apr 2024 10:30:17 -0700 Subject: [PATCH] Update auto-fix-qortal.sh ADDED additional pi4 checks and start script modifications therein. --- auto-fix-qortal.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/auto-fix-qortal.sh b/auto-fix-qortal.sh index 18f5119..ebb2947 100644 --- a/auto-fix-qortal.sh +++ b/auto-fix-qortal.sh @@ -139,14 +139,22 @@ if command -v raspi-config >/dev/null 2>&1 ; then mv start-modified-memory-args.sh ~/qortal/start.sh check_qortal else - echo "${WHITE} Machine is not ARM 32bit, adding correct start script and continuing...${NC}\n" + echo "${WHITE} Machine is not ARM 32bit, checking RAM amount and adding correct start script...${NC}\n" + totalm=$(free -m | awk '/^Mem:/{print $2}') + echo "${YELLOW} configuring auto-fix cron...${NC}\n" curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/auto-fix-cron crontab auto-fix-cron rm -rf auto-fix-cron - curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/start-6001-to-16000m.sh - mv start-6001*.sh ~/qortal/start.sh - chmod +x ~/qortal/*.sh - check_qortal + + if [ "$totalm" -le 6000 ]; then + echo "${WHITE} 4GB 64bit pi detected, grabbing correct start script and continuing...${NC}\n" + curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/4GB-start.sh && mv 4GB-start.sh ~/qortal/start.sh && chmod +x ~/qortal/start.sh + check_qortal + else + echo "${WHITE} 8GB 64bit pi detected, grabbing correct start script and continuing...${NC}\n" + curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/start-6001-to-16000m.sh && mv start-6001-to-16000m.sh ~/qortal/start.sh && chmod +x ~/qortal/start.sh + check_qortal + fi fi else echo "${YELLOW} Not a Raspberry pi machine, continuing...${NC}\n" check_memory