diff --git a/auto-fix-qortal.sh b/auto-fix-qortal.sh index 1b032f2..a96f5f2 100644 --- a/auto-fix-qortal.sh +++ b/auto-fix-qortal.sh @@ -191,20 +191,18 @@ setup_raspi_cron() { mkdir -p "${HOME}/backups/cron-backups" crontab -l > "${HOME}/backups/cron-backups/crontab-backup-$(date +%Y%m%d%H%M%S)" - echo -e "${YELLOW}Checking if autostart desktop shortcut exists to avoid double-launch...${NC}\n" - shopt -s nullglob - desktop_files=(${HOME}/.config/autostart/start-qortal*.desktop) - shopt -u nullglob + + echo -e "${YELLOW}Checking if autostart desktop shortcut exists to avoid double-launch...${NC}\n" - if [ ${#desktop_files[@]} -gt 0 ]; then - echo -e "${RED}Autostart desktop entry found! Using GUI-safe auto-fix cron only.${NC}\n" - curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/auto-fix-GUI-cron - crontab auto-fix-GUI-cron - rm -f auto-fix-GUI-cron - check_height - return - fi + if find "${HOME}/.config/autostart" -maxdepth 1 -name "start-qortal*.desktop" | grep -q .; then + echo -e "${RED}Autostart desktop entry found! Using GUI-safe auto-fix cron only.${NC}\n" + curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/auto-fix-GUI-cron + crontab auto-fix-GUI-cron + rm -f auto-fix-GUI-cron + check_height + return + fi echo -e "${BLUE}No autostart entries found. Setting up full headless cron...${NC}\n" curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/refs/heads/main/auto-fix-cron diff --git a/rebuilt-machine.sh b/rebuilt-machine.sh index 06a29e2..7b4679c 100644 --- a/rebuilt-machine.sh +++ b/rebuilt-machine.sh @@ -28,7 +28,7 @@ Type=Directory EOL sudo apt update -sudo apt -y --purge remove ubuntu-advantage-tools ubuntu-pro-client* +sudo apt -y --purge remove ubuntu-advantage-tools ubuntu-pro-client ubuntu-pro-client-li0n sudo apt -y upgrade sudo apt -y install git jq gnome-software unzip vim curl openjdk-21-jre yaru-theme-icon yaru-theme-gtk yaru-theme-unity zlib1g-dev vlc chromium-browser p7zip-full libfuse2 htop net-tools bpytop ffmpeg sysbench smartmontools ksnip xsensors fonts-symbola lm-sensors cinnamon-desktop-environment