diff --git a/scripts/fluidd.sh b/scripts/fluidd.sh index c866cdb..f8cba00 100644 --- a/scripts/fluidd.sh +++ b/scripts/fluidd.sh @@ -26,8 +26,7 @@ function install_fluidd(){ dependency_check "${dep[@]}" ### check if moonraker is already installed system_check_webui - ### ask user how to handle OctoPrint, Haproxy, Lighttpd, Apache2 if found - process_octoprint_dialog + ### ask user how to handle Haproxy, Lighttpd, Apache2 if found process_services_dialog ### process possible disruptive services process_disruptive_services @@ -324,8 +323,8 @@ function fluidd_port_check(){ if [ "${FLUIDD_ENABLED}" = "false" ]; then if [ "${SITE_ENABLED}" = "true" ]; then status_msg "Detected other enabled interfaces:" - [ "${OCTOPRINT_ENABLED}" = "true" ] && echo " ${cyan}● OctoPrint - Port: ${OCTOPRINT_PORT}${default}" - [ "${MAINSAIL_ENABLED}" = "true" ] && echo " ${cyan}● Mainsail - Port: ${MAINSAIL_PORT}${default}" + [ "${OCTOPRINT_ENABLED}" = "true" ] && echo " ${cyan}● OctoPrint - Port: ${OCTOPRINT_PORT}${white}" + [ "${MAINSAIL_ENABLED}" = "true" ] && echo " ${cyan}● Mainsail - Port: ${MAINSAIL_PORT}${white}" if [ "${MAINSAIL_PORT}" = "80" ] || [ "${OCTOPRINT_PORT}" = "80" ]; then PORT_80_BLOCKED="true" select_fluidd_port @@ -344,22 +343,22 @@ function select_fluidd_port(){ if [ "${PORT_80_BLOCKED}" = "true" ]; then echo top_border - echo -e "| ${red}!!!WARNING!!!${default} |" - echo -e "| ${red}You need to choose a different port for Fluidd!${default} |" - echo -e "| ${red}The following web interface is listening at port 80:${default} |" + echo -e "| ${red}!!!WARNING!!!${white} |" + echo -e "| ${red}You need to choose a different port for Fluidd!${white} |" + echo -e "| ${red}The following web interface is listening at port 80:${white} |" blank_line [ "${OCTOPRINT_PORT}" = "80" ] && echo "| ● OctoPrint |" [ "${MAINSAIL_PORT}" = "80" ] && echo "| ● Mainsail |" blank_line echo -e "| Make sure you don't choose a port which was already |" - echo -e "| assigned to one of the other webinterfaces and do ${red}NOT${default} |" + echo -e "| assigned to one of the other webinterfaces and do ${red}NOT${white} |" echo -e "| use ports in the range of 4750 or above! |" blank_line - echo -e "| Be aware: there is ${red}NO${default} sanity check for the following |" + echo -e "| Be aware: there is ${red}NO${white} sanity check for the following |" echo -e "| input. So make sure to choose a valid port! |" bottom_border while true; do - read -p "${cyan}Please enter a new Port:${default} " NEW_PORT + read -p "${cyan}Please enter a new Port:${white} " NEW_PORT if [ "${NEW_PORT}" != "${MAINSAIL_PORT}" ] && [ "${NEW_PORT}" != "${OCTOPRINT_PORT}" ]; then echo "Setting port ${NEW_PORT} for Fluidd!" SET_LISTEN_PORT=${NEW_PORT} diff --git a/scripts/mainsail.sh b/scripts/mainsail.sh index 8cbf41c..a920a62 100644 --- a/scripts/mainsail.sh +++ b/scripts/mainsail.sh @@ -26,8 +26,7 @@ function install_mainsail(){ dependency_check "${dep[@]}" ### check if moonraker is already installed system_check_webui - ### ask user how to handle OctoPrint, Haproxy, Lighttpd, Apache2 if found - process_octoprint_dialog + ### ask user how to handle Haproxy, Lighttpd, Apache2 if found process_services_dialog ### process possible disruptive services process_disruptive_services diff --git a/scripts/utilities.sh b/scripts/utilities.sh index f1980d5..d270718 100644 --- a/scripts/utilities.sh +++ b/scripts/utilities.sh @@ -513,38 +513,6 @@ function system_check_webui(){ fi } -function process_octoprint_dialog(){ - #ask user to disable octoprint when its service was found - if [ "${OCTOPRINT_ENABLED}" = "true" ]; then - while true; do - echo - top_border - echo -e "| ${red}!!! WARNING - OctoPrint service found !!!${white} |" - hr - echo -e "| You might consider disabling the OctoPrint service, |" - echo -e "| since an active OctoPrint service may lead to unex- |" - echo -e "| pected behavior of the Klipper Webinterfaces. |" - bottom_border - read -p "${cyan}###### Do you want to disable OctoPrint now? (Y/n):${default} " yn - case "${yn}" in - Y|y|Yes|yes|"") - echo -e "###### > Yes" - status_msg "Stopping OctoPrint ..." - do_action_service "stop" "octoprint" && ok_msg "OctoPrint service stopped!" - status_msg "Disabling OctoPrint ..." - do_action_service "disable" "octoprint" && ok_msg "OctoPrint service disabled!" - break;; - N|n|No|no) - echo -e "###### > No" - break;; - *) - print_unkown_cmd - print_msg && clear_msg;; - esac - done - fi -} - function fetch_webui_ports(){ ### read listen ports from possible installed interfaces ### and write them to ~/.kiauh.ini