fixed missing download in rebuilt machine script

This commit is contained in:
crowetic 2025-03-25 13:40:49 -07:00
parent bb8ca54010
commit 81ac129d2d
2 changed files with 18 additions and 0 deletions

View File

@ -389,6 +389,23 @@ potentially_update_settings() {
fi
### Step 4: Rotate backups (keep 2 newest) ###
echo "${YELLOW}Rotating old backups (keeping only 2)...${NC}"
cd "${BACKUP_FOLDER}" || exit 1
backup_count=$(ls -1 backup-settings-*.json 2>/dev/null | wc -l)
if [ "$backup_count" -gt 2 ]; then
# List oldest first, delete all but the 2 most recent
for old_backup in $(ls -1tr backup-settings-*.json | head -n -$((backup_count - 2))); do
echo "Deleting old backup: $old_backup"
rm -f "$old_backup"
done
else
echo "${BLUE}No old backups to delete.${NC}"
fi
cd - >/dev/null || exit 1
echo "${GREEN}Settings file is now valid. Proceeding...${NC}"
cd || exit 1

View File

@ -93,6 +93,7 @@ curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/aut
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-core.sh
curl -L -O https://cloud.qortal.org/s/machinefilesnew/download
chmod +x *.sh
unzip download