mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
修改服务启动逻辑
This commit is contained in:
@@ -357,8 +357,15 @@ export default class SystemService {
|
||||
|
||||
public async reloadSystem(target?: 'system' | 'data') {
|
||||
const cmd = `real_time=true ql reload ${target || ''}`;
|
||||
const cp = spawn(cmd, { shell: '/bin/bash' });
|
||||
const cp = spawn(cmd, {
|
||||
shell: '/bin/bash',
|
||||
detached: true,
|
||||
stdio: 'ignore',
|
||||
});
|
||||
cp.unref();
|
||||
setTimeout(() => {
|
||||
process.exit(0);
|
||||
});
|
||||
return { code: 200 };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user