mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
修复获取定时任务参数
This commit is contained in:
+1
-1
@@ -437,7 +437,7 @@ export async function killTask(pid: number) {
|
||||
[pid, ...pids].reverse().forEach((x) => {
|
||||
process.kill(x, 15);
|
||||
});
|
||||
} catch (error) {}
|
||||
} catch (error) { }
|
||||
} else {
|
||||
process.kill(pid, 2);
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ export default async () => {
|
||||
const lang = systemConfig.info?.lang || 'zh';
|
||||
await writeFile(config.langEnvFile, `export QL_LANG='${lang}'\n`);
|
||||
}
|
||||
} catch {}
|
||||
} catch { }
|
||||
setLang(systemConfig.info?.lang || 'zh');
|
||||
|
||||
await envService.set_envs();
|
||||
|
||||
@@ -42,13 +42,11 @@ export default class SshKeyService {
|
||||
key: string,
|
||||
): Promise<void> {
|
||||
try {
|
||||
await writeFileWithLock(
|
||||
path.join(this.sshPath, alias),
|
||||
`${key}${os.EOL}`,
|
||||
{
|
||||
mode: '400',
|
||||
},
|
||||
);
|
||||
const filePath = path.join(this.sshPath, alias);
|
||||
try {
|
||||
await rmPath(filePath);
|
||||
} catch { }
|
||||
await writeFileWithLock(filePath, `${key}${os.EOL}`, { mode: '400' });
|
||||
} catch (error) {
|
||||
this.logger.error('生成私钥文件失败', error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user