Added client tunnel reload on SIGHUP for Linux

This commit is contained in:
/dev/null 2016-07-21 17:57:43 -06:00
parent abcf030181
commit c908beade2
2 changed files with 10 additions and 2 deletions

View file

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