This commit is contained in:
crowetic 2025-05-08 19:58:40 -07:00
parent 58538c0019
commit 46f3b1cc63

View File

@ -69,7 +69,7 @@ check_internet() {
fi fi
if [ "$INTERNET_STATUS" = "UP" ]; then if [ "$INTERNET_STATUS" = "UP" ]; then
echo -e "${BLUE}Internet connection is UP, continuing...${NC}\n $(date +%Y-%m-%dT%H:%M:%S%Z) $(( $(date +%s) - $TIMESTAMP ))" echo "${BLUE}Internet connection is UP, continuing...${NC}\n $(date +%Y-%m-%dT%H:%M:%S%Z) $(( $(date +%s) - $TIMESTAMP ))"
rm -rf "${HOME}/Desktop/check-qortal-status.sh" rm -rf "${HOME}/Desktop/check-qortal-status.sh"
cd || exit 1 cd || exit 1
curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/check-qortal-status.sh && mv check-qortal-status.sh "${HOME}/qortal" && chmod +x "${HOME}/qortal/check-qortal-status.sh" curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/check-qortal-status.sh && mv check-qortal-status.sh "${HOME}/qortal" && chmod +x "${HOME}/qortal/check-qortal-status.sh"
@ -77,7 +77,7 @@ check_internet() {
curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/refresh-qortal.sh && chmod +x refresh-qortal.sh curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/refresh-qortal.sh && chmod +x refresh-qortal.sh
check_for_raspi check_for_raspi
else else
echo -e "${RED}Internet Connection is DOWN, please fix connection and restart device.${NC}\n$(date +%Y-%m-%dT%H:%M:%S%Z) $(( $(date +%s) - $TIMESTAMP ))" echo "${RED}Internet Connection is DOWN, please fix connection and restart device.${NC}\n$(date +%Y-%m-%dT%H:%M:%S%Z) $(( $(date +%s) - $TIMESTAMP ))"
sleep 30 sleep 30
exit 1 exit 1
fi fi
@ -237,7 +237,7 @@ setup_raspi_cron() {
echo "${YELLOW}Checking if autostart desktop shortcut exists to avoid double-launch...${NC}\n" echo "${YELLOW}Checking if autostart desktop shortcut exists to avoid double-launch...${NC}\n"
if find "${HOME}/.config/autostart" -maxdepth 1 -name "start-qortal*.desktop" | grep -q .; then if find "${HOME}/.config/autostart" -maxdepth 1 -name "start-qortal*.desktop" | grep -q .; then
echo -e "${RED}Autostart desktop entry found! Removing that and replacing with cron entry${NC}\n" echo "${RED}Autostart desktop entry found! Removing that and replacing with cron entry${NC}\n"
# rm -rf "${HOME}/.config/autostart/start-qortal*.desktop" "${HOME}/.config/autostart/auto-fix-qortal*.desktop" # rm -rf "${HOME}/.config/autostart/start-qortal*.desktop" "${HOME}/.config/autostart/auto-fix-qortal*.desktop"
curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/auto-fix-GUI-cron curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/auto-fix-GUI-cron
crontab auto-fix-GUI-cron crontab auto-fix-GUI-cron