From d18df337e4734098d4e135e58aec6644a595e33b Mon Sep 17 00:00:00 2001 From: Guy Sheffer Date: Tue, 16 Jul 2024 10:10:31 +0300 Subject: [PATCH] Fix webcam to work with /boot/firmware/octopi.txt path #823 https://github.com/guysoft/CustomPiOS/issues/220 --- src/modules/octopi/filesystem/home/root/bin/streamer_select | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/octopi/filesystem/home/root/bin/streamer_select b/src/modules/octopi/filesystem/home/root/bin/streamer_select index 9d965140..3b6662af 100755 --- a/src/modules/octopi/filesystem/home/root/bin/streamer_select +++ b/src/modules/octopi/filesystem/home/root/bin/streamer_select @@ -3,7 +3,11 @@ # Exit on any error. set -e +CONFIG_FILE=/boot/firmware/octopi.txt +# Fallback for older images +if [ ! -f "${CONFIG_FILE}" ] && [ -f "/boot/octopi.txt" ]; then CONFIG_FILE=/boot/octopi.txt +fi MJPEG_TYPE=mjpeg HLS_TYPE=hls MJPEG_SERVICE=webcamd.service @@ -29,4 +33,4 @@ elif [ "${camera_streamer}" = "${HLS_TYPE}" ]; then else echo "Streamer type '${camera_streamer}' is not supported." exit 1 -fi \ No newline at end of file +fi