mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-28 05:30:29 +08:00
Update manager.ts
This commit is contained in:
parent
12504704a3
commit
454ce10a9d
@ -17,9 +17,6 @@ export function startCore(): void {
|
|||||||
generateProfile()
|
generateProfile()
|
||||||
checkProfile()
|
checkProfile()
|
||||||
stopCore()
|
stopCore()
|
||||||
if (process.platform !== 'win32') {
|
|
||||||
execSync(`chmod +x ${corePath}`)
|
|
||||||
}
|
|
||||||
child = spawn(corePath, ['-d', mihomoWorkDir()])
|
child = spawn(corePath, ['-d', mihomoWorkDir()])
|
||||||
child.stdout?.on('data', (data) => {
|
child.stdout?.on('data', (data) => {
|
||||||
fs.writeFileSync(
|
fs.writeFileSync(
|
||||||
@ -52,9 +49,5 @@ export function restartCore(): void {
|
|||||||
|
|
||||||
export function checkProfile(): void {
|
export function checkProfile(): void {
|
||||||
const corePath = mihomoCorePath(getAppConfig().core ?? 'mihomo')
|
const corePath = mihomoCorePath(getAppConfig().core ?? 'mihomo')
|
||||||
if (process.platform !== 'win32') {
|
|
||||||
execSync(`chmod +x ${corePath}`)
|
|
||||||
}
|
|
||||||
|
|
||||||
execFileSync(corePath, ['-t', '-f', mihomoWorkConfigPath(), '-d', mihomoTestDir()])
|
execFileSync(corePath, ['-t', '-f', mihomoWorkConfigPath(), '-d', mihomoTestDir()])
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user