release: v2.1.0 - Prompt管理系统、页脚优化、图标修复

This commit is contained in:
ZJPB Admin
2025-12-30 01:17:08 +08:00
parent 9e47ebe749
commit 9f5d006090
23 changed files with 5871 additions and 99 deletions

61
manage.sh Normal file
View File

@@ -0,0 +1,61 @@
#!/bin/bash
# ZJPB 应用管理脚本
# 用法: ./manage.sh [start|stop|restart|status|logs]
APP_NAME="zjpb"
APP_DIR="/www/wwwroot/zjpb"
VENV_DIR="$APP_DIR/venv"
PID_FILE="$APP_DIR/logs/gunicorn.pid"
cd $APP_DIR
case "$1" in
start)
echo "启动 $APP_NAME..."
source $VENV_DIR/bin/activate
gunicorn -c gunicorn_config.py app:app
echo "$APP_NAME 已启动"
;;
stop)
echo "停止 $APP_NAME..."
if [ -f $PID_FILE ]; then
kill $(cat $PID_FILE)
echo "$APP_NAME 已停止"
else
echo "PID文件不存在可能未运行"
fi
;;
restart)
$0 stop
sleep 2
$0 start
;;
status)
if [ -f $PID_FILE ]; then
PID=$(cat $PID_FILE)
if ps -p $PID > /dev/null; then
echo "$APP_NAME 正在运行 (PID: $PID)"
else
echo "$APP_NAME 未运行但PID文件存在"
fi
else
echo "$APP_NAME 未运行"
fi
;;
logs)
echo "实时查看日志Ctrl+C退出"
tail -f logs/error.log
;;
*)
echo "用法: $0 {start|stop|restart|status|logs}"
exit 1
;;
esac
exit 0