Browse Source

Merge pull request #581 from PurpleI2P/reloadconfig_on_SIGHUP

Reload client config on SIGHUP
pull/583/head
orignal 9 years ago committed by GitHub
parent
commit
2793eeb10a
  1. 2
      DaemonLinux.cpp

2
DaemonLinux.cpp

@ -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)

Loading…
Cancel
Save