# 设置脚本在任何命令失败时立即退出 | |
set -e | |
# 设置脚本在执行命令时打印命令本身 | |
set -x | |
RAYCAST_CMD="python -m uvicorn app.main:app --host 0.0.0.0 --port 3000" | |
# 运行 Raycast API Proxy | |
$RAYCAST_CMD "$@" & | |
# 捕获中断信号并清理资源 | |
trap 'kill $(jobs -p); exit 1' INT TERM | |
# 等待所有后台进程结束 | |
wait |
# 设置脚本在任何命令失败时立即退出 | |
set -e | |
# 设置脚本在执行命令时打印命令本身 | |
set -x | |
RAYCAST_CMD="python -m uvicorn app.main:app --host 0.0.0.0 --port 3000" | |
# 运行 Raycast API Proxy | |
$RAYCAST_CMD "$@" & | |
# 捕获中断信号并清理资源 | |
trap 'kill $(jobs -p); exit 1' INT TERM | |
# 等待所有后台进程结束 | |
wait |