From 0f9618fb243f10c8145634a9640cf06ac82cfaa4 Mon Sep 17 00:00:00 2001 From: Cyril Date: Mon, 20 May 2024 12:50:00 +0200 Subject: [PATCH] Update --- scripts/menu/3V3/customize_menu_3V3.sh | 12 ++++++------ scripts/menu/K1/customize_menu_K1.sh | 12 ++++++------ scripts/menu/KE/customize_menu_KE.sh | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/scripts/menu/3V3/customize_menu_3V3.sh b/scripts/menu/3V3/customize_menu_3V3.sh index 4afd6ae..295b747 100755 --- a/scripts/menu/3V3/customize_menu_3V3.sh +++ b/scripts/menu/3V3/customize_menu_3V3.sh @@ -52,16 +52,16 @@ function customize_menu_3v3() { 3) if [ -d "$GUPPY_SCREEN_FOLDER" ]; then error_msg "Guppy Screen is already installed!" - echo -e " ${darkred}Please remove Guppy Screen first if you want to change the theme.${white}" - echo - elif [ -d "$IMP_SHAPERS_FOLDER" ]; then - error_msg "Please remove Improved Shapers Calibrations first, Guppy Screen already use it!" - elif [ ! -f /lib/ld-2.29.so ]; then - error_msg "Make sure you're running latest firmware version!" elif [ ! -d "$MOONRAKER_FOLDER" ]; then error_msg "Updated Moonraker is needed, please install it first!" + elif [ "$(curl -s localhost:7125/server/info | jq .result.klippy_connected)" != "true" ]; then + error_msg "Moonraker and Klipper do not seem to be functional. Please check this!" + elif [ ! -f /lib/ld-2.29.so ]; then + error_msg "Make sure you're running latest firmware version!" elif [ ! -f "$KLIPPER_SHELL_FILE" ]; then error_msg "Klipper Gcode Shell Command is needed, please install it first!" + elif [ -d "$IMP_SHAPERS_FOLDER" ]; then + error_msg "Please remove Improved Shapers Calibrations first, Guppy Screen already use it!" else run "install_guppy_screen" "customize_menu_ui_3v3" fi;; diff --git a/scripts/menu/K1/customize_menu_K1.sh b/scripts/menu/K1/customize_menu_K1.sh index 70e8756..ec33b71 100755 --- a/scripts/menu/K1/customize_menu_K1.sh +++ b/scripts/menu/K1/customize_menu_K1.sh @@ -71,16 +71,16 @@ function customize_menu_k1() { 5) if [ -d "$GUPPY_SCREEN_FOLDER" ]; then error_msg "Guppy Screen is already installed!" - echo -e " ${darkred}Please remove Guppy Screen first if you want to change the theme.${white}" - echo - elif [ -d "$IMP_SHAPERS_FOLDER" ]; then - error_msg "Please remove Improved Shapers Calibrations first, Guppy Screen already use it!" - elif [ ! -f /lib/ld-2.29.so ]; then - error_msg "Make sure you're running latest firmware version!" elif [ ! -d "$MOONRAKER_FOLDER" ] && [ ! -d "$NGINX_FOLDER" ]; then error_msg "Moonraker and Nginx are needed, please install them first!" + elif [ "$(curl -s localhost:7125/server/info | jq .result.klippy_connected)" != "true" ]; then + error_msg "Moonraker and Klipper do not seem to be functional. Please check this!" + elif [ ! -f /lib/ld-2.29.so ]; then + error_msg "Make sure you're running latest firmware version!" elif [ ! -f "$KLIPPER_SHELL_FILE" ]; then error_msg "Klipper Gcode Shell Command is needed, please install it first!" + elif [ -d "$IMP_SHAPERS_FOLDER" ]; then + error_msg "Please remove Improved Shapers Calibrations first, Guppy Screen already use it!" else run "install_guppy_screen" "customize_menu_ui_k1" fi;; diff --git a/scripts/menu/KE/customize_menu_KE.sh b/scripts/menu/KE/customize_menu_KE.sh index 4bc2467..c7a6170 100755 --- a/scripts/menu/KE/customize_menu_KE.sh +++ b/scripts/menu/KE/customize_menu_KE.sh @@ -52,16 +52,16 @@ function customize_menu_ke() { 3) if [ -d "$GUPPY_SCREEN_FOLDER" ]; then error_msg "Guppy Screen is already installed!" - echo -e " ${darkred}Please remove Guppy Screen first if you want to change the theme.${white}" - echo - elif [ -d "$IMP_SHAPERS_FOLDER" ]; then - error_msg "Please remove Improved Shapers Calibrations first, Guppy Screen already use it!" - elif [ ! -f /lib/ld-2.29.so ]; then - error_msg "Make sure you're running latest firmware version!" elif [ ! -d "$MOONRAKER_FOLDER" ] && [ ! -d "$NGINX_FOLDER" ]; then error_msg "Moonraker and Nginx are needed, please install them first!" + elif [ "$(curl -s localhost:7125/server/info | jq .result.klippy_connected)" != "true" ]; then + error_msg "Moonraker and Klipper do not seem to be functional. Please check this!" + elif [ ! -f /lib/ld-2.29.so ]; then + error_msg "Make sure you're running latest firmware version!" elif [ ! -f "$KLIPPER_SHELL_FILE" ]; then error_msg "Klipper Gcode Shell Command is needed, please install it first!" + elif [ -d "$IMP_SHAPERS_FOLDER" ]; then + error_msg "Please remove Improved Shapers Calibrations first, Guppy Screen already use it!" else run "install_guppy_screen" "customize_menu_ui_ke" fi;;