#!/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 $!