mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-22 22:36:06 +08:00
修改 npm 安装启动命令
This commit is contained in:
parent
c9e2534efa
commit
42fff8422a
41
.npmignore
41
.npmignore
|
@ -1,20 +1,21 @@
|
|||
.github/
|
||||
.vscode/
|
||||
.history/
|
||||
back/
|
||||
cli/
|
||||
data/
|
||||
src/
|
||||
static/**/*.js.map
|
||||
static/**/*.gz
|
||||
.editorconfig
|
||||
.gitignore
|
||||
.prettierignore
|
||||
.prettierrc
|
||||
.umirc.ts
|
||||
nodemon.json
|
||||
pnpm-lock.yaml
|
||||
tsconfig.back.json
|
||||
tsconfig.json
|
||||
typings.d.ts
|
||||
.env
|
||||
/.tmp/
|
||||
/.github/
|
||||
/.vscode/
|
||||
/.history/
|
||||
/back/
|
||||
/cli/
|
||||
/data/
|
||||
/src/
|
||||
/static/**/*.js.map
|
||||
/static/**/*.gz
|
||||
/.editorconfig
|
||||
/.gitignore
|
||||
/.prettierignore
|
||||
/.prettierrc
|
||||
/.umirc.ts
|
||||
/nodemon.json
|
||||
/pnpm-lock.yaml
|
||||
/tsconfig.back.json
|
||||
/tsconfig.json
|
||||
/typings.d.ts
|
||||
/.env
|
|
@ -16,14 +16,14 @@ if [[ ! $QL_DIR ]]; then
|
|||
fi
|
||||
|
||||
if [[ $QL_DIR ]]; then
|
||||
echo -e "请先设置 export QL_DIR=$QL_DIR,环境变量,并添加到系统环境变量,然后再次执行命令 qinglong 启动服务"
|
||||
echo -e "请先手动设置 export QL_DIR=$QL_DIR,环境变量,并手动添加到系统环境变量,然后再次执行命令 qinglong 启动服务"
|
||||
fi
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! $QL_DATA_DIR ]]; then
|
||||
echo -e "请先设置数据存储目录 export QL_DATA_DIR 环境变量,目录必须以斜杠开头的绝对路径,并添加到系统环境变量"
|
||||
echo -e "请先手动设置数据存储目录 export QL_DATA_DIR 环境变量,目录必须以斜杠开头的绝对路径,并手动添加到系统环境变量"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -56,8 +56,7 @@ else
|
|||
exit 1
|
||||
fi
|
||||
|
||||
npm install -g pnpm@8.3.1
|
||||
pnpm add -g pm2 tsx
|
||||
npm install -g pnpm@8.3.1 pm2 tsx
|
||||
|
||||
cd ${QL_DIR}
|
||||
cp -f .env.example .env
|
||||
|
@ -66,6 +65,7 @@ chmod 777 ${QL_DIR}/shell/*.sh
|
|||
. ${QL_DIR}/shell/env.sh
|
||||
. ${QL_DIR}/shell/share.sh
|
||||
|
||||
echo -e "======================1. 检测配置文件========================\n"
|
||||
make_dir /etc/nginx/conf.d
|
||||
make_dir /run/nginx
|
||||
init_nginx
|
||||
|
@ -73,16 +73,28 @@ fix_config
|
|||
|
||||
pm2 l &>/dev/null
|
||||
|
||||
echo -e "======================2. 安装依赖========================\n"
|
||||
patch_version
|
||||
|
||||
echo -e "======================3. 启动nginx========================\n"
|
||||
nginx -s reload 2>/dev/null || nginx -c /etc/nginx/nginx.conf
|
||||
echo -e "nginx启动成功...\n"
|
||||
|
||||
reload_update
|
||||
reload_pm2
|
||||
|
||||
nginx -s reload 2>/dev/null || nginx -c /etc/nginx/nginx.conf
|
||||
|
||||
if [[ $AutoStartBot == true ]]; then
|
||||
nohup ql -l bot >$dir_log/bot.log 2>&1 &
|
||||
echo -e "======================5. 启动bot========================\n"
|
||||
nohup ql bot >$dir_log/bot.log 2>&1 &
|
||||
echo -e "bot后台启动中...\n"
|
||||
fi
|
||||
|
||||
if [[ $EnableExtraShell == true ]]; then
|
||||
nohup ql -l extra >$dir_log/extra.log 2>&1 &
|
||||
echo -e "====================6. 执行自定义脚本========================\n"
|
||||
nohup ql extra >$dir_log/extra.log 2>&1 &
|
||||
echo -e "自定义脚本后台执行中...\n"
|
||||
fi
|
||||
|
||||
echo -e "############################################################\n"
|
||||
echo -e "启动完成..."
|
||||
echo -e "############################################################\n"
|
Loading…
Reference in New Issue
Block a user