Merge pull request #662 from Xaekai/SignalHandler

Add a simple listener for SIGUSR2 to reload SSL certs
This commit is contained in:
Calvin Montgomery 2017-05-14 18:39:50 -07:00 committed by GitHub
commit dd97c244f2
1 changed files with 5 additions and 0 deletions

View File

@ -130,6 +130,11 @@ if (Config.get("service-socket.enabled")) {
server.init(handleLine, Config.get("service-socket.socket"));
}
// Hi I'm Mr POSIX! Look at me!
process.on('SIGUSR2', () => {
sv.reloadCertificateData();
});
require("bluebird");
process.on("unhandledRejection", function (reason, promise) {
Logger.errlog.log("[SEVERE] Unhandled rejection: " + reason.stack);