From 32ee26ef4e5df2d045109ef4162764848d6864cd Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 1 Sep 2025 22:18:12 +1200 Subject: [PATCH] Update squashkiwi-streaming/install.sh --- squashkiwi-streaming/install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/squashkiwi-streaming/install.sh b/squashkiwi-streaming/install.sh index 151476d..69a87dc 100755 --- a/squashkiwi-streaming/install.sh +++ b/squashkiwi-streaming/install.sh @@ -18,10 +18,10 @@ mkdir -p "${LOCAL_DATA_FOLDER}/config/web" cp -r "${SCRIPT_DIR}/config/"* "${LOCAL_DATA_FOLDER}/config/" || _die "Failed to copy config files" # URL-encode the camera password if it contains special characters -if [[ "${CAMERA_PASSWORD}" == *[!\@\#\$\&\%]* ]]; then +# Only encode if not already encoded (check for % sign) +if [[ "${CAMERA_PASSWORD}" == *[!\@\#\$\&]* ]] && [[ "${CAMERA_PASSWORD}" != *%* ]]; then echo "Note: Camera password contains special characters. Encoding for RTSP URL..." - CAMERA_PASSWORD_ENCODED=$(echo -n "${CAMERA_PASSWORD}" | sed 's/!/%21/g; s/@/%40/g; s/#/%23/g; s/\$/%24/g; s/&/%26/g; s/%/%25/g') - export CAMERA_PASSWORD="${CAMERA_PASSWORD_ENCODED}" + CAMERA_PASSWORD=$(echo -n "${CAMERA_PASSWORD}" | sed 's/!/%21/g; s/@/%40/g; s/#/%23/g; s/\$/%24/g; s/&/%26/g') fi # Create .env file for docker-compose with all required variables