File size: 364 Bytes
9636d57
 
8bfa319
 
 
 
 
 
 
9636d57
b8f7c7a
8bfa319
 
 
 
b88e56f
8bfa319
9636d57
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

# 设置脚本在任何命令失败时立即退出
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