From bc0044d1191c9f47b9d553e281052473e4b2f398 Mon Sep 17 00:00:00 2001 From: hanhh <18330117883@163.com> Date: Wed, 16 Jun 2021 23:25:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20pm2=20=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shell/update.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/shell/update.sh b/shell/update.sh index a8f16a2f..dbdbcb7a 100755 --- a/shell/update.sh +++ b/shell/update.sh @@ -301,15 +301,13 @@ update_qinglong() { } reload_pm2() { - local app_pid=$(ps -ef | grep "app.js" | grep -v grep) - if [ "$app_pid" != "" ]; then + if [[ $(pm2 info panel 2>/dev/null) ]]; then pm2 reload panel >/dev/null 2>&1 else pm2 start $dir_root/build/app.js -n panel >/dev/null 2>&1 fi - local schedule_pid=$(ps -ef | grep "schedule.js" | grep -v grep) - if [ "$schedule_pid" != "" ]; then + if [[ $(pm2 info schedule 2>/dev/null) ]]; then pm2 reload schedule >/dev/null 2>&1 else pm2 start $dir_root/build/schedule.js -n schedule >/dev/null 2>&1