rebuild命令添加pm2服务无法自动启动时,自动启动

This commit is contained in:
whyour
2021-03-28 21:13:23 +08:00
parent 44addb6ff3
commit b8e3a451c3
3 changed files with 10 additions and 4 deletions
Regular → Executable
+7 -2
View File
@@ -12,14 +12,19 @@ git reset --mixed
echo -e "更新shell完成...\n"
echo -e "重新build...\n"
yarn install --registry=https://registry.npm.taobao.org
yarn build
yarn build-back
echo -e "重新build完成...\n"
echo -e "重启服务...\n"
pm2 restart panel
PIDS=`ps -ef|grep "app.js"|grep -v grep`
if [ "$PIDS" != "" ]; then
pm2 restart panel
else
pm2 start ${QL_DIR}/build/app.js -n panel
fi
nginx -s reload
echo -e "重启服务完成...\n"