From c2abf14dd31726455cf77a0c6718b7d3e35f57e2 Mon Sep 17 00:00:00 2001 From: "Josh.5" Date: Sat, 17 Sep 2022 23:54:32 +1200 Subject: [PATCH] Fix some issues with the nginx template config after a container restart --- overlay/etc/cont-init.d/90-configure_vnc.sh | 3 ++- overlay/opt/noVNC/{nginx.conf => nginx.template.conf} | 0 2 files changed, 2 insertions(+), 1 deletion(-) rename overlay/opt/noVNC/{nginx.conf => nginx.template.conf} (100%) diff --git a/overlay/etc/cont-init.d/90-configure_vnc.sh b/overlay/etc/cont-init.d/90-configure_vnc.sh index 8aa5448..776e47b 100644 --- a/overlay/etc/cont-init.d/90-configure_vnc.sh +++ b/overlay/etc/cont-init.d/90-configure_vnc.sh @@ -26,7 +26,7 @@ if ([ "${MODE}" != "s" ] && [ "${MODE}" != "secondary" ]); then # Note: Ports 32035-32248 are unallocated port ranges. We should be able to find something in here that we can use # REF: https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?&page=130 export PORT_VNC=$(get_unused_port 32035) - echo "Configure VNC service port '${PORT_NOVNC_SERVICE}'" + echo "Configure VNC service port '${PORT_VNC}'" export PORT_NOVNC_SERVICE=$(get_unused_port ${PORT_VNC}) echo "Configure noVNC service port '${PORT_NOVNC_SERVICE}'" export PORT_AUDIO_WEBSOCKET=$(get_unused_port ${PORT_NOVNC_SERVICE}) @@ -35,6 +35,7 @@ if ([ "${MODE}" != "s" ] && [ "${MODE}" != "secondary" ]); then echo "Configure pulseaudio encoded stream port '${PORT_AUDIO_STREAM}'" # Configure Nginx proxy for the websocket and VNC + cp -f /opt/noVNC/nginx.template.conf /opt/noVNC/nginx.conf sed -i "s||${USER}|" /opt/noVNC/nginx.conf sed -i "s||${PORT_NOVNC_WEB}|" /opt/noVNC/nginx.conf sed -i "s||${PORT_NOVNC_SERVICE}|" /opt/noVNC/nginx.conf diff --git a/overlay/opt/noVNC/nginx.conf b/overlay/opt/noVNC/nginx.template.conf similarity index 100% rename from overlay/opt/noVNC/nginx.conf rename to overlay/opt/noVNC/nginx.template.conf