From 32be5a6591ca713b2aac1c6b23d4f2960b6319ea Mon Sep 17 00:00:00 2001 From: whyour Date: Fri, 2 Apr 2021 22:10:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=B9=E5=99=A8=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E7=A8=8B=E5=BA=8F=E9=A1=BA=E5=BA=8F=EF=BC=8C=E9=98=B2?= =?UTF-8?q?=E6=AD=A2=E6=9B=B4=E6=96=B0=E6=BA=90=E4=BB=A3=E7=A0=81=E9=98=BB?= =?UTF-8?q?=E5=A1=9E=E9=9D=A2=E6=9D=BF=E5=90=AF=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/docker-entrypoint.sh | 12 ++++++------ shell/git_pull.sh | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index 51bf73df..68baf6f3 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -45,11 +45,15 @@ echo -e "======================2. 启动nginx========================\n" nginx -c /etc/nginx/nginx.conf 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 echo -echo -e "======================4. 启动挂机程序========================\n" +echo -e "======================5. 启动挂机程序========================\n" CookieConf=${QL_DIR}/config/cookie.sh . ${QL_DIR}/config/config.sh . ${CookieConf} @@ -60,10 +64,6 @@ else echo -e "尚未在Cookie管理中添加一条Cookie,可能是首次部署容器,因此不启动挂机程序...\n" fi -echo -e "======================5. 启动控制面板========================\n" - pm2 start ${QL_DIR}/build/app.js -n panel - echo -e "控制面板启动成功...\n" - echo -e "\n容器启动成功...\n" if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then diff --git a/shell/git_pull.sh b/shell/git_pull.sh index 0ee673d2..4cfc3541 100755 --- a/shell/git_pull.sh +++ b/shell/git_pull.sh @@ -100,12 +100,12 @@ Npm_Install() { ## npm install 子程序,判断是否为安卓,判断是否安装有yarn function Npm_InstallSub() { 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 - 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 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 }