mirror of
https://github.com/itdoginfo/podkop.git
synced 2025-12-12 14:37:03 +03:00
feat: add skip next checks if sb is not running
This commit is contained in:
@@ -80,4 +80,6 @@ export const PodkopShellMethods = {
|
||||
callBaseMethod<unknown>(Podkop.AvailableMethods.SHOW_SING_BOX_CONFIG),
|
||||
checkLogs: async () =>
|
||||
callBaseMethod<unknown>(Podkop.AvailableMethods.CHECK_LOGS),
|
||||
getSystemInfo: async () =>
|
||||
callBaseMethod<unknown>(Podkop.AvailableMethods.GET_SYSTEM_INFO),
|
||||
};
|
||||
|
||||
@@ -101,7 +101,7 @@ export async function runSingBoxCheck() {
|
||||
],
|
||||
});
|
||||
|
||||
if (!atLeastOneGood) {
|
||||
if (!atLeastOneGood || !data.sing_box_process_running) {
|
||||
throw new Error('Sing-box checks failed');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,6 +68,7 @@ async function handleRestart() {
|
||||
restart: { loading: false },
|
||||
},
|
||||
});
|
||||
store.reset(['diagnosticsChecks']);
|
||||
}, 5000);
|
||||
}
|
||||
}
|
||||
@@ -93,6 +94,7 @@ async function handleStop() {
|
||||
stop: { loading: false },
|
||||
},
|
||||
});
|
||||
store.reset(['diagnosticsChecks']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,6 +120,7 @@ async function handleStart() {
|
||||
start: { loading: false },
|
||||
},
|
||||
});
|
||||
store.reset(['diagnosticsChecks']);
|
||||
}, 5000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,6 +67,7 @@ export namespace Podkop {
|
||||
GLOBAL_CHECK = 'global_check',
|
||||
SHOW_SING_BOX_CONFIG = 'show_sing_box_config',
|
||||
CHECK_LOGS = 'check_logs',
|
||||
GET_SYSTEM_INFO = 'get_system_info',
|
||||
}
|
||||
|
||||
export enum AvailableClashAPIMethods {
|
||||
|
||||
Reference in New Issue
Block a user