Exit on SIGINT or SIGTERM

This commit is contained in:
Derrick Hammer 2022-08-05 00:06:31 -04:00
parent 1fd1c932ca
commit 50051076d9
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 6 additions and 0 deletions

View File

@ -15,3 +15,9 @@ boot();
process.on("uncaughtException", function (err) { process.on("uncaughtException", function (err) {
console.log(`Caught exception: ${err.message} ${err.stack}`); console.log(`Caught exception: ${err.message} ${err.stack}`);
}); });
process.on("SIGINT", function () {
process.exit();
});
process.on("SIGTERM", function () {
process.exit();
});