mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
Exit on SIGTERM (#1891)
Stopping the systemd service running the server now works properly.
This commit is contained in:
parent
b9133cb683
commit
6f49f870ed
11
src/www
11
src/www
@ -8,10 +8,13 @@ process.on('unhandledRejection', error => {
|
|||||||
require('./services/log').info(error);
|
require('./services/log').info(error);
|
||||||
});
|
});
|
||||||
|
|
||||||
process.on('SIGINT', function() {
|
function exit() {
|
||||||
console.log("Caught interrupt signal. Exiting.");
|
console.log("Caught interrupt/termination signal. Exiting.");
|
||||||
process.exit();
|
process.exit(0);
|
||||||
});
|
}
|
||||||
|
|
||||||
|
process.on('SIGINT', exit);
|
||||||
|
process.on('SIGTERM', exit);
|
||||||
|
|
||||||
const { app, sessionParser } = require('./app');
|
const { app, sessionParser } = require('./app');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user