Add a simple listener for SIGUSR2 to reload SSL certs

This commit is contained in:
Xaekai 2017-05-14 04:20:58 -07:00
parent de309d675e
commit 8dae6e66cc
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")); server.init(handleLine, Config.get("service-socket.socket"));
} }
// Hi I'm Mr POSIX! Look at me!
process.on('SIGUSR2', () => {
sv.reloadCertificateData();
});
require("bluebird"); require("bluebird");
process.on("unhandledRejection", function (reason, promise) { process.on("unhandledRejection", function (reason, promise) {
Logger.errlog.log("[SEVERE] Unhandled rejection: " + reason.stack); Logger.errlog.log("[SEVERE] Unhandled rejection: " + reason.stack);