fix: disable error-prone api checks

This commit is contained in:
th33xitus
2020-11-06 17:53:39 +01:00
parent 3d065c0f1b
commit 88fd83638c
3 changed files with 28 additions and 28 deletions

View File

@@ -51,7 +51,7 @@ install_mainsail(){
mainsail_port_check mainsail_port_check
#creating the mainsail nginx cfg #creating the mainsail nginx cfg
set_nginx_cfg "mainsail" set_nginx_cfg "mainsail"
test_nginx "$SET_LISTEN_PORT" #test_nginx "$SET_LISTEN_PORT"
locate_printer_cfg && read_printer_cfg "mainsail" locate_printer_cfg && read_printer_cfg "mainsail"
install_webui_macros install_webui_macros
mainsail_setup mainsail_setup

View File

@@ -17,7 +17,7 @@ install_moonraker(){
#after install actions #after install actions
restart_moonraker restart_moonraker
restart_klipper restart_klipper
test_api #test_api
} }
system_check_moonraker(){ system_check_moonraker(){
@@ -542,16 +542,16 @@ handle_haproxy_lighttpd(){
############################################################# #############################################################
############################################################# #############################################################
test_api(){ #test_api(){
HOST_IP=$(hostname -I | cut -d" " -f1) # HOST_IP=$(hostname -I | cut -d" " -f1)
status_msg "Testing API ..." # status_msg "Testing API ..."
status_msg "Please wait ..." # status_msg "Please wait ..."
sleep 15 # sleep 15
status_msg "API response from http://"$HOST_IP":7125/printer/info :" # status_msg "API response from http://"$HOST_IP":7125/printer/info :"
echo -e "${cyan}$(curl -s "http://"$HOST_IP":7125/printer/info")${default}" # 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 # if [ $(curl -s "http://"$HOST_IP":7125/printer/info" | grep '^{"result"' -c) -eq 1 ]; then
echo; ok_msg "Klipper API is working correctly!"; echo # echo; ok_msg "Klipper API is working correctly!"; echo
else # else
echo; warn_msg "Klipper API not working correctly!"; echo # echo; warn_msg "Klipper API not working correctly!"; echo
fi # fi
} #}

View File

@@ -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) LISTEN_PORT=$(grep listen /etc/nginx/sites-enabled/$1 | head -1 | sed 's/^\s*//' | cut -d" " -f2 | cut -d";" -f1)
} }
test_nginx(){ #test_nginx(){
HOST_IP=$(hostname -I | cut -d" " -f1) # HOST_IP=$(hostname -I | cut -d" " -f1)
status_msg "Testing NGINX ..." # status_msg "Testing NGINX ..."
status_msg "Please wait ..." # status_msg "Please wait ..."
sleep 15 # sleep 15
status_msg "API response from http://$HOST_IP:$1/printer/info :" # status_msg "API response from http://$HOST_IP:$1/printer/info :"
echo -e "${cyan}$(curl -s "http://"$HOST_IP:$1"/printer/info")${default}" # 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 # if [ $(curl -s "http://"$HOST_IP:$1"/printer/info" | grep '^{"result"' -c) -eq 1 ]; then
echo; ok_msg "NGINX is working correctly!"; echo # echo; ok_msg "NGINX is working correctly!"; echo
else # else
echo; warn_msg "NGINX is not working correctly!"; echo # echo; warn_msg "NGINX is not working correctly!"; echo
fi # fi
} #}
detect_enabled_sites(){ detect_enabled_sites(){
#check if there is another UI config already installed #check if there is another UI config already installed