Merge branch 'master' into feat/video-BGfilter

This commit is contained in:
2026-07-10 09:20:03 +00:00
4 changed files with 90 additions and 13 deletions
+21 -13
View File
@@ -319,19 +319,25 @@ extract_pingora_env_files_from_unit() {
find_pingora_gateway_env_file() {
local service_name="$1"
local env_file listen
local env_file listen unit_env_files
while IFS= read -r env_file; do
if [[ "${env_file}" != /* ]]; then
echo "[production-api-deploy] Pingora EnvironmentFile 必须使用绝对路径: ${env_file}" >&2
exit 1
fi
listen="$(read_env_value "${env_file}" "GENARRATIVE_PINGORA_GATEWAY_LISTEN")"
if [[ -n "${listen}" ]]; then
printf "%s\n" "${env_file}"
return
fi
done < <(extract_pingora_env_files_from_unit "${service_name}")
if ! unit_env_files="$(extract_pingora_env_files_from_unit "${service_name}")"; then
return 1
fi
if [[ -n "${unit_env_files}" ]]; then
while IFS= read -r env_file; do
if [[ "${env_file}" != /* ]]; then
echo "[production-api-deploy] Pingora EnvironmentFile 必须使用绝对路径: ${env_file}" >&2
exit 1
fi
listen="$(read_env_value "${env_file}" "GENARRATIVE_PINGORA_GATEWAY_LISTEN")"
if [[ -n "${listen}" ]]; then
printf "%s\n" "${env_file}"
return
fi
done <<< "${unit_env_files}"
fi
echo "[production-api-deploy] Pingora systemd 配置缺少包含 GENARRATIVE_PINGORA_GATEWAY_LISTEN 的 EnvironmentFile: ${service_name}" >&2
exit 1
@@ -363,7 +369,9 @@ check_pingora_shadow_service_config() {
local service_name="$1"
local env_file
env_file="$(find_pingora_gateway_env_file "${service_name}")"
if ! env_file="$(find_pingora_gateway_env_file "${service_name}")"; then
return 1
fi
require_pingora_shadow_env "${env_file}"
printf "%s\n" "${env_file}"
}