Files
shaitoken/start_service.sh
2025-04-15 05:58:55 +00:00

19 lines
436 B
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# start_service.sh - 启动服务脚本
# 颜色定义
GREEN='\033[0;32m'
NC='\033[0m' # 恢复默认颜色
# 切换到工作目录
cd /www/wwwroot/api2.nosqli.com
# 如果venv存在则激活
if [ -d "venv" ]; then
source venv/bin/activate
fi
# 启动服务
php think CursorTokenFilter >> runtime/log/service.log 2>&1 &
echo $! > service.pid
echo -e "${GREEN}服务已在后台启动PID: $(cat service.pid)${NC}"