1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-22 04:04:16 +00:00

Reload client config on SIGHUP

This commit is contained in:
Mikal Villa 2016-07-24 17:58:26 +08:00
parent 3d1a7f173c
commit 8fb093b272

View File

@ -13,6 +13,7 @@
#include "FS.h" #include "FS.h"
#include "Log.h" #include "Log.h"
#include "RouterContext.h" #include "RouterContext.h"
#include "ClientContext.h"
void handle_signal(int sig) void handle_signal(int sig)
{ {
@ -21,6 +22,7 @@ void handle_signal(int sig)
case SIGHUP: case SIGHUP:
LogPrint(eLogInfo, "Daemon: Got SIGHUP, reopening log..."); LogPrint(eLogInfo, "Daemon: Got SIGHUP, reopening log...");
i2p::log::Logger().Reopen (); i2p::log::Logger().Reopen ();
i2p::client::context.ReloadConfig();
break; break;
case SIGINT: case SIGINT:
if (i2p::context.AcceptsTunnels () && !Daemon.gracefullShutdownInterval) if (i2p::context.AcceptsTunnels () && !Daemon.gracefullShutdownInterval)