aktaliosieren
This commit is contained in:
@@ -27,10 +27,20 @@ async function runCheck(check) {
|
||||
}
|
||||
|
||||
if (check.type === "script") {
|
||||
|
||||
if (!check.script_name) {
|
||||
return {
|
||||
status: "FAIL",
|
||||
message: "No script_name defined",
|
||||
duration: Date.now() - start
|
||||
};
|
||||
}
|
||||
|
||||
return new Promise((resolve) => {
|
||||
const scriptPath = path.join(CHECKS_DIR, check.script_name);
|
||||
|
||||
const child = spawn("sh", [scriptPath], {
|
||||
timeout: check.timeout_seconds * 1000
|
||||
timeout: (check.timeout_seconds || 10) * 1000
|
||||
});
|
||||
|
||||
child.on("close", (code) => {
|
||||
|
||||
Reference in New Issue
Block a user