From 48a100f49a44225b98d46978e456b304ccaeeea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Sat, 11 May 2024 10:51:07 +0800 Subject: [PATCH] feat: reboot-uncomplete --- src/common/utils/reboot.ts | 16 ++++++++++++++++ src/core | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 src/common/utils/reboot.ts diff --git a/src/common/utils/reboot.ts b/src/common/utils/reboot.ts new file mode 100644 index 00000000..26057ec3 --- /dev/null +++ b/src/common/utils/reboot.ts @@ -0,0 +1,16 @@ +import { exit } from "process"; +import { resolve } from "path"; +async function reboot() { + + let batScript = resolve(__dirname, '../napcat.bat'); + let batUtf8Script = resolve(__dirname, '../napcat-utf8.bat'); + let bashScript = resolve(__dirname, '../napcat.sh'); + //如果是win系统写出 5s延迟启动 默认batUtf8Script启动 + // 如果是linux系统写出 5s延迟启动 默认bashScript启动 + if (process.platform === 'win32') { + // console.log('正在重启...'); + } else if (process.platform === 'linux') { + //console.log('正在重启...'); + } + exit(0); +} \ No newline at end of file diff --git a/src/core b/src/core index 85d0256d..519d686d 160000 --- a/src/core +++ b/src/core @@ -1 +1 @@ -Subproject commit 85d0256dbcc9cf0d1773da3f10cfc180be1ab56b +Subproject commit 519d686d71b1f891e8f30ec4bb1415f24d5c9271