mirror of https://github.com/calzoneman/sync.git
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"));
|
||||
}
|
||||
|
||||
// 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);
|
||||
|
|
Loading…
Reference in New Issue