From 920bfa7f84d7819eb352ff07732e9388f8d40043 Mon Sep 17 00:00:00 2001 From: "Josh.5" Date: Wed, 27 Nov 2024 15:57:20 +1300 Subject: [PATCH] Add 'WEBUI_USER' and 'WEBUI_PASS' These do not yet do anything, but they will soon enough. --- Dockerfile.debian | 3 +++ overlay/usr/bin/start-sunshine.sh | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Dockerfile.debian b/Dockerfile.debian index 7aa8405..8a93f08 100644 --- a/Dockerfile.debian +++ b/Dockerfile.debian @@ -546,6 +546,7 @@ ENV \ NVIDIA_VISIBLE_DEVICES="all" # Set container configuration environment variables +# TODO: Set the default WEBUI_USER & WEBUI_PASS after release of SHUI ENV \ MODE="primary" \ WEB_UI_MODE="vnc" \ @@ -554,6 +555,8 @@ ENV \ NEKO_PASSWORD_ADMIN=admin \ ENABLE_STEAM="true" \ STEAM_ARGS="-silent" \ + WEBUI_USER="" \ + WEBUI_PASS="" \ ENABLE_SUNSHINE="true" \ ENABLE_EVDEV_INPUTS="true" \ ENABLE_WOL_POWER_MANAGER="false" \ diff --git a/overlay/usr/bin/start-sunshine.sh b/overlay/usr/bin/start-sunshine.sh index 9563ec8..4db6d48 100755 --- a/overlay/usr/bin/start-sunshine.sh +++ b/overlay/usr/bin/start-sunshine.sh @@ -5,8 +5,8 @@ # File Created: Tuesday, 4th October 2022 8:22:17 pm # Author: Josh.5 (jsunnex@gmail.com) # ----- -# Last Modified: Tuesday, 4th October 2022 8:22:17 pm -# Modified By: Josh.5 (jsunnex@gmail.com) +# Last Modified: Wednesday, 27th November 2024 3:54:19 pm +# Modified By: Josh5 (jsunnex@gmail.com) ### set -e source /usr/bin/common-functions.sh @@ -49,6 +49,10 @@ fi if ([ "X${SUNSHINE_USER:-}" != "X" ] && [ "X${SUNSHINE_PASS:-}" != "X" ]); then /usr/bin/sunshine "${USER_HOME:?}/.config/sunshine/sunshine.conf" --creds "${SUNSHINE_USER:?}" "${SUNSHINE_PASS:?}" fi +# If we are running the SHUI, then force the same user upon sunshine +if ([ "X${WEBUI_USER:-}" != "X" ] && [ "X${WEBUI_PASS:-}" != "X" ]); then + /usr/bin/sunshine "${USER_HOME:?}/.config/sunshine/sunshine.conf" --creds "${WEBUI_USER:?}" "${WEBUI_PASS:?}" +fi # Remove any auto-start scripts from user's .local dir if [ -f "${USER_HOME:?}/.config/autostart/Sunshine.desktop" ]; then rm -fv "${USER_HOME:?}/.config/autostart/Sunshine.desktop"