mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 23:06:06 +08:00
修改容器启动程序顺序,防止更新源代码阻塞面板启动
This commit is contained in:
parent
81ba9d5e52
commit
32be5a6591
|
@ -45,11 +45,15 @@ echo -e "======================2. 启动nginx========================\n"
|
||||||
nginx -c /etc/nginx/nginx.conf
|
nginx -c /etc/nginx/nginx.conf
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo -e "======================3. 更新源代码========================\n"
|
echo -e "======================3. 启动控制面板========================\n"
|
||||||
|
pm2 start ${QL_DIR}/build/app.js -n panel
|
||||||
|
echo -e "控制面板启动成功...\n"
|
||||||
|
|
||||||
|
echo -e "======================4. 更新源代码========================\n"
|
||||||
git_pull
|
git_pull
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo -e "======================4. 启动挂机程序========================\n"
|
echo -e "======================5. 启动挂机程序========================\n"
|
||||||
CookieConf=${QL_DIR}/config/cookie.sh
|
CookieConf=${QL_DIR}/config/cookie.sh
|
||||||
. ${QL_DIR}/config/config.sh
|
. ${QL_DIR}/config/config.sh
|
||||||
. ${CookieConf}
|
. ${CookieConf}
|
||||||
|
@ -60,10 +64,6 @@ else
|
||||||
echo -e "尚未在Cookie管理中添加一条Cookie,可能是首次部署容器,因此不启动挂机程序...\n"
|
echo -e "尚未在Cookie管理中添加一条Cookie,可能是首次部署容器,因此不启动挂机程序...\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "======================5. 启动控制面板========================\n"
|
|
||||||
pm2 start ${QL_DIR}/build/app.js -n panel
|
|
||||||
echo -e "控制面板启动成功...\n"
|
|
||||||
|
|
||||||
echo -e "\n容器启动成功...\n"
|
echo -e "\n容器启动成功...\n"
|
||||||
|
|
||||||
if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then
|
if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then
|
||||||
|
|
|
@ -100,12 +100,12 @@ Npm_Install() {
|
||||||
## npm install 子程序,判断是否为安卓,判断是否安装有yarn
|
## npm install 子程序,判断是否为安卓,判断是否安装有yarn
|
||||||
function Npm_InstallSub() {
|
function Npm_InstallSub() {
|
||||||
if [ -n "$isTermux" ]; then
|
if [ -n "$isTermux" ]; then
|
||||||
npm install --no-bin-links --no-save || npm install --no-save --no-bin-links --registry=https://registry.npm.taobao.org
|
npm install --no-save --no-bin-links --registry=https://registry.npm.taobao.org || npm install --no-bin-links --no-save
|
||||||
elif ! type yarn >/dev/null 2>&1; then
|
elif ! type yarn >/dev/null 2>&1; then
|
||||||
npm install --no-save || npm install --no-save --registry=https://registry.npm.taobao.org
|
npm install --no-save --registry=https://registry.npm.taobao.org || npm install --no-save
|
||||||
else
|
else
|
||||||
echo -e "检测到本机安装了 yarn,使用 yarn 替代 npm...\n"
|
echo -e "检测到本机安装了 yarn,使用 yarn 替代 npm...\n"
|
||||||
yarn install || yarn install --registry=https://registry.npm.taobao.org
|
yarn install --registry=https://registry.npm.taobao.org || yarn install
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user