1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Add catcher for PM2 graceful shutdown

This commit is contained in:
Dave Conway-Jones 2020-02-04 13:42:34 +00:00
parent fcf757f715
commit 0622be843b
No known key found for this signature in database
GPG Key ID: 302A6725C594817F

View File

@ -353,3 +353,6 @@ process.on('SIGTERM', brexit);
process.on('SIGHUP', brexit);
process.on('SIGUSR2', brexit); // for nodemon restart
process.on('SIGBREAK', brexit); // for windows ctrl-break
process.on('message', function(m) { // for PM2 under window with --shutdown-with-message
if (m === 'shutdown') { brexit }
});