File size: 451 Bytes
b2ab624
 
6eaf348
 
 
b2ab624
6eaf348
 
b2ab624
 
6eaf348
 
b2ab624
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

# 获取当前脚本所在的绝对路径
SCRIPT_DIR=$(dirname "$(readlink -f "$0")")

# 后台运行 tail 进程
cd "${SCRIPT_DIR}/tools" && tar -xf subconverter_linux64.tar.gz
cd "${SCRIPT_DIR}/tools/subconverter" && ./subconverter >> "${SCRIPT_DIR}/subconverter.log" 2>&1 &

# 运行 uvicorn 应用
cd "${SCRIPT_DIR}"
uvicorn app:app --host 0.0.0.0 --port 7860

# (可选) 等待 tail 进程结束,但它通常不会结束
# wait $!