Merge pull request #662 from Xaekai/SignalHandler
Add a simple listener for SIGUSR2 to reload SSL certs
This commit is contained in:
commit
dd97c244f2
5
index.js
5
index.js
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue