Update squashkiwi-streaming/install.sh
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 21s
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 21s
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user