diff --git a/resources/octoprint_nginx.cfg b/resources/octoprint_nginx.cfg deleted file mode 100644 index c3bdad4..0000000 --- a/resources/octoprint_nginx.cfg +++ /dev/null @@ -1,40 +0,0 @@ -map $http_upgrade $connection_upgrade { - default upgrade; - '' close; -} - -upstream octoprint { - server 127.0.0.1:5000; -} - -upstream mjpg-streamer { - server 127.0.0.1:8080; -} - -server { - listen 80; - #listen [::]:80; - - location / { - proxy_pass http://octoprint/; - proxy_set_header Host $http_host; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Scheme $scheme; - #proxy_set_header X-Script-Name /; - proxy_http_version 1.1; - client_max_body_size 0; - } - - location /webcam { - proxy_pass http://mjpg-streamer/; - } - - # redirect server error pages to the static page /50x.html - error_page 500 502 503 504 /50x.html; - location = /50x.html { - root html; - } -} \ No newline at end of file diff --git a/scripts/fluidd.sh b/scripts/fluidd.sh index 7e53485..ff6f1f6 100644 --- a/scripts/fluidd.sh +++ b/scripts/fluidd.sh @@ -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 diff --git a/scripts/mainsail.sh b/scripts/mainsail.sh index e470ab0..6fe2a7f 100644 --- a/scripts/mainsail.sh +++ b/scripts/mainsail.sh @@ -465,13 +465,10 @@ function mainsail_port_check() { if [[ ${SITE_ENABLED} == "true" ]]; then status_msg "Detected other enabled interfaces:" - [[ ${OCTOPRINT_ENABLED} == "true" ]] && \ - echo -e " ${cyan}● OctoPrint - Port: ${OCTOPRINT_PORT}${white}" - [[ ${FLUIDD_ENABLED} == "true" ]] && \ echo -e " ${cyan}● Fluidd - Port: ${FLUIDD_PORT}${white}" - if [[ ${FLUIDD_PORT} == "80" ]] || [[ ${OCTOPRINT_PORT} == "80" ]]; then + if [[ ${FLUIDD_PORT} == "80" ]]; then PORT_80_BLOCKED="true" select_mainsail_port fi @@ -494,12 +491,10 @@ function select_mainsail_port() { echo -e "| ${red}You need to choose a different port for Mainsail!${white} |" echo -e "| ${red}The following web interface is listening at port 80:${white} |" blank_line - [[ ${OCTOPRINT_PORT} == "80" ]] && echo "| ● OctoPrint |" [[ ${FLUIDD_PORT} == "80" ]] && echo "| ● Fluidd |" 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${white} |" - echo -e "| use ports in the range of 4750 or above! |" + 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! |" @@ -508,7 +503,7 @@ function select_mainsail_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} != "${FLUIDD_PORT}" && ${new_port} != "${OCTOPRINT_PORT}" ]]; then + if [[ ${new_port} =~ ${re} && ${new_port} != "${FLUIDD_PORT}" ]]; then select_msg "Setting port ${new_port} for Mainsail!" SET_LISTEN_PORT=${new_port} break diff --git a/scripts/nginx.sh b/scripts/nginx.sh index 464bf4f..56cd0f8 100644 --- a/scripts/nginx.sh +++ b/scripts/nginx.sh @@ -291,7 +291,7 @@ function read_listen_port() { } function detect_enabled_sites() { - MAINSAIL_ENABLED="false" FLUIDD_ENABLED="false" OCTOPRINT_ENABLED="false" + MAINSAIL_ENABLED="false" FLUIDD_ENABLED="false" #check if there is another UI config already installed and reads the port they are listening on if [[ -e "/etc/nginx/sites-enabled/mainsail" ]]; then SITE_ENABLED="true" && MAINSAIL_ENABLED="true" @@ -302,8 +302,4 @@ function detect_enabled_sites() { FLUIDD_PORT=$(read_listen_port "fluidd") fi - if [[ -e "/etc/nginx/sites-enabled/octoprint" ]]; then - SITE_ENABLED="true" && OCTOPRINT_ENABLED="true" - OCTOPRINT_PORT=$(read_listen_port "octoprint") - fi } \ No newline at end of file diff --git a/scripts/octoprint.sh b/scripts/octoprint.sh index 8d53f71..3641697 100644 --- a/scripts/octoprint.sh +++ b/scripts/octoprint.sh @@ -374,9 +374,6 @@ function remove_octoprint() { remove_octoprint_env remove_octoprint_dir - ### remove octoprint_port from ~/.kiauh.ini - sed -i "/^octoprint_port=/d" "${INI_FILE}" - local confirm="OctoPrint was successfully removed!" print_confirm "${confirm}" && return