refactor: remove octoprint port check

kiauh does not support setting up nginx configs for octoprint anyways. saving and comparing a non existing port is useless code

Signed-off-by: Dominik Willner th33xitus@gmail.com
This commit is contained in:
th33xitus
2022-05-22 17:42:10 +02:00
parent dc133053b3
commit 55a86c086e
5 changed files with 7 additions and 63 deletions

View File

@@ -344,13 +344,10 @@ function fluidd_port_check() {
if [[ ${SITE_ENABLED} == "true" ]]; then
status_msg "Detected other enabled interfaces:"
[[ ${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
if [[ ${MAINSAIL_PORT} == "80" ]]; then
PORT_80_BLOCKED="true"
select_fluidd_port
fi
@@ -373,11 +370,10 @@ function select_fluidd_port() {
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 is already |"
echo -e "| assigned to one of the other webinterfaces |"
echo -e "| assigned to another webinterface! |"
blank_line
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! |"
@@ -386,7 +382,7 @@ function select_fluidd_port() {
local new_port re="^[0-9]+$"
while true; do
read -p "${cyan}Please enter a new Port:${white} " new_port
if [[ ${new_port} =~ ${re} && ${new_port} != "${MAINSAIL_PORT}" && ${new_port} != "${OCTOPRINT_PORT}" ]]; then
if [[ ${new_port} =~ ${re} && ${new_port} != "${MAINSAIL_PORT}" ]]; then
select_msg "Setting port ${new_port} for Fluidd!"
SET_LISTEN_PORT=${new_port}
break