From 7a86df509409f68bc5774bc9576757575e960664 Mon Sep 17 00:00:00 2001 From: Sirly <45280500+SirlyDreamer@users.noreply.github.com> Date: Thu, 16 Jun 2022 00:59:43 +0000 Subject: [PATCH] =?UTF-8?q?=E5=96=B5=E5=96=B5=E6=9B=B4=E6=96=B0=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E9=87=8D=E5=90=AF=E9=80=82=E9=85=8Dnode=20app?= =?UTF-8?q?=E7=9A=84=E5=90=AF=E5=8A=A8=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/admin.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/admin.js b/apps/admin.js index 08edc90a..b74fe44e 100644 --- a/apps/admin.js +++ b/apps/admin.js @@ -180,7 +180,10 @@ export async function updateMiaoPlugin(e) { qq: e.user_id }), { EX: 30 }); timer = setTimeout(function () { - let command = "npm run restart"; + let command = `npm run start`; + if(process.argv[1].includes("pm2")){ + command = `npm run restart`; + } exec(command, function (error, stdout, stderr) { if (error) { if (/Yunzai not found/.test(error)) {