From 88fd83638c3aad95bd1cbcce6ba17d52296c659a Mon Sep 17 00:00:00 2001 From: th33xitus Date: Fri, 6 Nov 2020 17:53:39 +0100 Subject: [PATCH] fix: disable error-prone api checks --- scripts/install_klipper_webui.sh | 2 +- scripts/install_moonraker.sh | 28 ++++++++++++++-------------- scripts/network_functions.sh | 26 +++++++++++++------------- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/scripts/install_klipper_webui.sh b/scripts/install_klipper_webui.sh index 4c6822a..1e0dead 100755 --- a/scripts/install_klipper_webui.sh +++ b/scripts/install_klipper_webui.sh @@ -51,7 +51,7 @@ install_mainsail(){ mainsail_port_check #creating the mainsail nginx cfg set_nginx_cfg "mainsail" - test_nginx "$SET_LISTEN_PORT" + #test_nginx "$SET_LISTEN_PORT" locate_printer_cfg && read_printer_cfg "mainsail" install_webui_macros mainsail_setup diff --git a/scripts/install_moonraker.sh b/scripts/install_moonraker.sh index c4eb45a..0bf3543 100755 --- a/scripts/install_moonraker.sh +++ b/scripts/install_moonraker.sh @@ -17,7 +17,7 @@ install_moonraker(){ #after install actions restart_moonraker restart_klipper - test_api + #test_api } system_check_moonraker(){ @@ -542,16 +542,16 @@ handle_haproxy_lighttpd(){ ############################################################# ############################################################# -test_api(){ - HOST_IP=$(hostname -I | cut -d" " -f1) - status_msg "Testing API ..." - status_msg "Please wait ..." - sleep 15 - status_msg "API response from http://"$HOST_IP":7125/printer/info :" - echo -e "${cyan}$(curl -s "http://"$HOST_IP":7125/printer/info")${default}" - if [ $(curl -s "http://"$HOST_IP":7125/printer/info" | grep '^{"result"' -c) -eq 1 ]; then - echo; ok_msg "Klipper API is working correctly!"; echo - else - echo; warn_msg "Klipper API not working correctly!"; echo - fi -} \ No newline at end of file +#test_api(){ +# HOST_IP=$(hostname -I | cut -d" " -f1) +# status_msg "Testing API ..." +# status_msg "Please wait ..." +# sleep 15 +# status_msg "API response from http://"$HOST_IP":7125/printer/info :" +# echo -e "${cyan}$(curl -s "http://"$HOST_IP":7125/printer/info")${default}" +# if [ $(curl -s "http://"$HOST_IP":7125/printer/info" | grep '^{"result"' -c) -eq 1 ]; then +# echo; ok_msg "Klipper API is working correctly!"; echo +# else +# echo; warn_msg "Klipper API not working correctly!"; echo +# fi +#} \ No newline at end of file diff --git a/scripts/network_functions.sh b/scripts/network_functions.sh index 2b7c7e9..926f468 100755 --- a/scripts/network_functions.sh +++ b/scripts/network_functions.sh @@ -39,19 +39,19 @@ read_listen_port(){ LISTEN_PORT=$(grep listen /etc/nginx/sites-enabled/$1 | head -1 | sed 's/^\s*//' | cut -d" " -f2 | cut -d";" -f1) } -test_nginx(){ - HOST_IP=$(hostname -I | cut -d" " -f1) - status_msg "Testing NGINX ..." - status_msg "Please wait ..." - sleep 15 - status_msg "API response from http://$HOST_IP:$1/printer/info :" - echo -e "${cyan}$(curl -s "http://"$HOST_IP:$1"/printer/info")${default}" - if [ $(curl -s "http://"$HOST_IP:$1"/printer/info" | grep '^{"result"' -c) -eq 1 ]; then - echo; ok_msg "NGINX is working correctly!"; echo - else - echo; warn_msg "NGINX is not working correctly!"; echo - fi -} +#test_nginx(){ +# HOST_IP=$(hostname -I | cut -d" " -f1) +# status_msg "Testing NGINX ..." +# status_msg "Please wait ..." +# sleep 15 +# status_msg "API response from http://$HOST_IP:$1/printer/info :" +# echo -e "${cyan}$(curl -s "http://"$HOST_IP:$1"/printer/info")${default}" +# if [ $(curl -s "http://"$HOST_IP:$1"/printer/info" | grep '^{"result"' -c) -eq 1 ]; then +# echo; ok_msg "NGINX is working correctly!"; echo +# else +# echo; warn_msg "NGINX is not working correctly!"; echo +# fi +#} detect_enabled_sites(){ #check if there is another UI config already installed