mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-21 22:48:13 +00:00
喵喵更新自动重启适配node app的启动方式
This commit is contained in:
parent
b393fbcba9
commit
7a86df5094
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user