Dont run VNC or apply the VNC audio patch when running as a secondary container

This commit is contained in:
Josh.5
2022-02-08 14:36:19 +13:00
parent 168c46ae72
commit 75c2df3115
2 changed files with 33 additions and 22 deletions

View File

@@ -1,6 +1,7 @@
echo "**** Configure VNC audio ****" echo "**** Configure VNC audio ****"
if [ "${MODE}" != "s" ] & [ "${MODE}" != "secondary" ]; then
if [[ "${ENABLE_VNC_AUDIO}" == "true" ]]; then if [[ "${ENABLE_VNC_AUDIO}" == "true" ]]; then
# Credits for this audio patch: # Credits for this audio patch:
# - https://github.com/novnc/noVNC/issues/302 # - https://github.com/novnc/noVNC/issues/302
@@ -26,5 +27,6 @@ else
# Disable supervisord script # Disable supervisord script
sed -i 's|^autostart.*=.*$|autostart=false|' /etc/supervisor.d/vnc-audio.ini sed -i 's|^autostart.*=.*$|autostart=false|' /etc/supervisor.d/vnc-audio.ini
fi fi
fi
echo "DONE" echo "DONE"

View File

@@ -12,6 +12,13 @@ if [ "${MODE}" == "s" ] | [ "${MODE}" == "secondary" ]; then
# Disable vnc # Disable vnc
echo " - Disable vnc" echo " - Disable vnc"
sed -i 's|^autostart.*=.*$|autostart=false|' /etc/supervisor.d/vnc.ini sed -i 's|^autostart.*=.*$|autostart=false|' /etc/supervisor.d/vnc.ini
# Disable vnc
echo " - Disable vnc"
sed -i 's|^autostart.*=.*$|autostart=false|' /etc/supervisor.d/vnc.ini
# Disable vnc-audio
echo " - Disable vnc audio stream"
echo " - Disable vnc audio websock"
sed -i 's|^autostart.*=.*$|autostart=false|' /etc/supervisor.d/vnc-audio.ini
# Disable xorg # Disable xorg
echo " - Disable xorg" echo " - Disable xorg"
sed -i 's|^autostart.*=.*$|autostart=false|' /etc/supervisor.d/xorg.ini sed -i 's|^autostart.*=.*$|autostart=false|' /etc/supervisor.d/xorg.ini
@@ -26,3 +33,5 @@ if [ "${MODE}" == "s" ] | [ "${MODE}" == "secondary" ]; then
echo " - Enable udev" echo " - Enable udev"
sed -i 's|^autostart.*=.*$|autostart=true|' /etc/supervisor.d/udev.ini sed -i 's|^autostart.*=.*$|autostart=true|' /etc/supervisor.d/udev.ini
fi fi
echo "DONE"