fix
This commit is contained in:
parent
72c9212d9e
commit
1011d293b8
|
|
@ -30,6 +30,15 @@ if (!(await existsAsync(dir("app")))) {
|
||||||
await dirAsync(dir("app"));
|
await dirAsync(dir("app"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
process.on("message", (message) => {
|
||||||
|
if (message === "kill") {
|
||||||
|
if (g.server) {
|
||||||
|
g.server.stop(true);
|
||||||
|
process.exit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (!(await existsAsync(dir("app/db")))) {
|
if (!(await existsAsync(dir("app/db")))) {
|
||||||
await $`unzip -o pkgs/zip/dbzip -d app`;
|
await $`unzip -o pkgs/zip/dbzip -d app`;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ const startMain = (argv?: string) => {
|
||||||
ipc(message, subprocess) {
|
ipc(message, subprocess) {
|
||||||
if (message === "restart") {
|
if (message === "restart") {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
subprocess.kill();
|
subprocess.send("kill");
|
||||||
}, 5000);
|
}, 5000);
|
||||||
main.process = startMain("skip_types");
|
main.process = startMain("skip_types");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue