Files
endial 694480f2ae
ci/woodpecker/push/woodpecker Pipeline was successful
refactor: replace legacy LOG_* functions with standardized logging
- Replace LOG_D calls with debug() function
- Replace LOG_I calls with info() function
- Maintain echo() in build-time overrides script
- Fix 'command not found' errors for LOG_I function
- Ensure consistent logging format across all runtime scripts

Modified files:
- customer/usr/local/bin/common.sh: 4 LOG_D -> debug calls
- customer/usr/local/bin/setup.sh: 3 LOG_I -> info, 1 LOG_D -> debug calls
- customer/usr/local/bin/run.sh: 2 LOG_I -> info calls
- customer/usr/local/bin/entry.sh: already using info() calls (no changes needed)
2026-01-23 16:00:34 +08:00

25 lines
997 B
Bash
Executable File

#!/bin/bash
# Ver: 1.5 by Endial Fang (endial@126.com)
#
# 应用启动脚本;组合默认的配置参数及容器启动时传入的 CMD 参数,启动应用
# 设置 shell 执行参数,可使用'-'(打开)'+'(关闭)控制。常用:
# -e: 命令执行错误则报错(errexit); -u: 变量未定义则报错(nounset); -x: 打印实际待执行的命令行; -o pipefail: 设置管道中命令遇到失败则报错
set -euo pipefail
. /usr/local/lib/liblog.sh # 日志输出函数库
. /usr/local/bin/environment.sh # 设置环境变量
info "** Processing run.sh **"
readonly START_COMMAND="$(command -v ${APP_EXEC:-${APP_NAME}})"
# 配置默认启动参数(应用配置文件、前台方式启动)
flags=()
[[ -n "${APP_CONF_FILE:-}" ]] && flags+=("-c" "${APP_CONF_FILE}")
[[ -n "${APP_EXTRA_FLAGS:-}" ]] && flags+=("${APP_EXTRA_FLAGS[@]}")
flags+=("$@")
info "Start ${APP_NAME} with command: ${START_COMMAND[@]} ${flags[@]}"
exec "${START_COMMAND[@]}" "${flags[@]}"