Update squashkiwi-streaming/install.sh
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 21s

This commit is contained in:
Your Name
2025-09-01 22:18:12 +12:00
parent f1b107748a
commit 32ee26ef4e

View File

@@ -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